Dismiss
Announcing Stack Overflow Documentation

We started with Q&A. Technical documentation is next, and we need your help.

Whether you're a beginner or an experienced developer, you can contribute.

Sign up and start helping → Learn more about Documentation →

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.

share|improve this question

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)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.