I am populating input field with existing db value.
Now its working as MaxDate.
I am using below code :
HTML
<input type="text" id="restrict_from_date" name="restrict_from_date" value="<?= isset($clubRestrictionDetail->restrict_from_date) ? date("d M Y",strtotime($clubRestrictionDetail->restrict_from_date)) : '' ?>" class="form-control" readonly>
I am populating input field with existing db value. Now its working as MaxDate.
I am using below code : HTML <input type="text" id="restrict_from_date" name="restrict_from_date" value="<?= isset($clubRestrictionDetail->restrict_from_date) ? date("d M Y",strtotime($clubRestrictionDetail->restrict_from_date)) : '' ?>" class="form-control" readonly>
<input type="text" id="restrict_to_date" name="restrict_to_date" value="<?= isset($clubRestrictionDetail->restrict_to_date) ? date("d M Y",strtotime($clubRestrictionDetail->restrict_to_date)) : '' ?>" class="form-control" readonly>
JS CODE $(document).ready(function () { var dateToday = new Date(); var restrict_from_date = $('#restrict_from_date'); var restrict_to_date = $('#restrict_to_date'); var start_date = new Date(2019,09,17); $.timepicker.dateRange( restrict_from_date, restrict_to_date, { minInterval: (24 1000 60 * 60), // 1hr dateFormat: 'dd M yy', start: {}, // start picker options end: {} // end picker options
} ); });
Above code screen shot attached![screencapture](https://user-images.githubusercontent.com/25814292/64864645-38803000-d655-11e9-8a01-1ca5e7b6124d.png)
Thanks in advance.
Regards, Avinash S