Datetimepicker custom date range
Posted: 31 Oct 2017, 08:00
Hello everyone,
I've been asked in my company to do some customizations into Mantis 2.3.0, and one of it is about preventing the user to select a date after the today date.
Unfortunately so far I've not been able to do so with the following suggestions found into the net:
## Using the maxDate attribute through Javascript ##
$(function() {
$( "#datepicker" ).datepicker({ maxDate: new Date });
});
##Using the data-date-start-date and data-date-end-date attributes directly into my inputs##
data-date-start-date="0d"
data-date-end-date="0d"
##Using the endDate attribute through Javascript ##
$(function() {
$( "#datepicker" ).datepicker({
endDate: +0d });
});
Is there anyone who has found a solution please ?
Thanks in advance for your help,
I've been asked in my company to do some customizations into Mantis 2.3.0, and one of it is about preventing the user to select a date after the today date.
Unfortunately so far I've not been able to do so with the following suggestions found into the net:
## Using the maxDate attribute through Javascript ##
$(function() {
$( "#datepicker" ).datepicker({ maxDate: new Date });
});
##Using the data-date-start-date and data-date-end-date attributes directly into my inputs##
data-date-start-date="0d"
data-date-end-date="0d"
##Using the endDate attribute through Javascript ##
$(function() {
$( "#datepicker" ).datepicker({
endDate: +0d });
});
Is there anyone who has found a solution please ?
Thanks in advance for your help,