1

Need some help here. I have a datepicker in html5 native code. Code looks like this

    <input name="cidt" type="date" id="cidate" ng-model="reserve.ci" min="{{today}}" required ng-change="getMinCo()" disableDates>

And the directive

    myapp.directive('disableDates', function(){
        return function(scope, element, attrs){
            var disableddates = ["2016-07-14","2016-07-15"];
            //need to code here
        }
    });

note: angularjs uses jqlite to modify attributes of an element. But there is no reference I could find to change the specific dates of this input type, other than min and max.

I just need to figure out how to disable those dates from being selected. Couldn't find any resource on google either. Any help appreciated.

1 Answer 1

0

There is no property or method provided as far as i have seen in w3c input type = date for disabling certain dates but you can only enable valid dates and that also according to the range.

Below is the link: https://www.w3.org/TR/html5/forms.html#date-state-(type=date)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.