- <input type="text" class="input-field datefilingcls hasDatepicker" id="txt_dateofintimation" name="field1" readonly="">
Create a JQ function representing link to that field's id “txt_dateofintimation” for selecting only past dates and the max date is today only with a gap of 3 months.
- $(document).ready(function() {
- loadBlankPage();
- var dateToday = new Date();
- $("#txt_dateofintimation").datepicker({
- numberOfMonths: 3,
- showButtonPanel: true,
- maxDate: dateToday
- });
- })

Current date is 17th May 2017 as shown below in the bottom bar and the function also allows us to select the dates before today as per the validation requirement.
Join the conversation! Your thoughts help the community grow.