How does Datepicker only select future dates and disable past date in JQuery and CSS?
What class should be used for datepicker to use future dates only?
<form:input path="FutureDato" type="date" class="datepicker maxDateToday hasDatepicker" />
Note . The code was written by someone else. The above code does not allow you to enter a date in the future, or you can tell that to disable future dates when you click on the calendar. I want the code to disable past dates and only show dates for future years. I can't figure out how these classes work here (datepicker, maxDateToday); couldn't find it in CSS. I don't know what the JQuery is running on; if yes then i can't find the same. If such classes are predefined, can you help me find the class?
source to share
Use datepicker minDate () method, you can find api details http://api.jqueryui.com/datepicker/
$( ".selector" ).datepicker({
minDate: new Date()
});
for this you first need to import the jQuery-UI script https://code.jquery.com/ui/
I hope this works.
source to share