Thanks for liking our tutorials ,we are getting a lots of comments and appreciation from you guys which means a lot to us .Taking our earlier tutorial JQUERY DATEPICKER RESTRICT DATES IN SECOND DATE FIELD BASED ON SELECTED DATE IN FIRST DATE FIELD as a refrence , we received a lots of comments on it where our fellow developers have situations where they want to disable past dates or upcoming dates from Datepicker.
So today we are here with a Snippet in which we will learn how to disable past dates or upcoming dates in PHP Datepicker.
Disable Past Dates:
We can easily disable old dates from datepicker by using Jquery function and setting minimum date to today
Disable Upcoming Dates:
We can easily disable upcoming dates from datepicker by using Jquery function and setting minimum date to today
Whole Script Goes Like This:
Demo By PHPHURDLES
Disable Upcoming Dates in Datepicker
Disable Previous Dates in Datepicker
Run Code Snippet
That’s how we can diasable past or upcoming dates from datepicker
Hope this tutorial will help our those fellow developers which are facing problem in this.
and guys feel free to share your problems with us,comment us or mail us at firstname.lastname@example.org.You can also share your experiences in our new section write for us where you can write your own tutorials and can help your fellows.
Because Hurdles aren’t really Hurdles