datetimepicker
datetimepicker copied to clipboard
disabled change value when scroll.
when i'm try to scroll month value is changed. how to stop it?
The issue is actually like when you change monnth, current value of datetimepicker is changed to that particular month's value but it should be not changed.
So current date for which .xdsoft_current
class is there is keep changing on month change and we can not get actual current date that is selected.
But, as a work around we can write custom class on selecting date.
onGenerate: function(ct) {
let currentdt = new Date($('#startdate').val());
if ($('#startdate').val()) {
$(this).find('[data-date="' + currentdt.getDate() + '"]' + '[data-month="' + currentdt.getMonth() + '"]' +
'[data-year="' + currentdt.getFullYear() + '"]').addClass('actualcurrentdate');
}
},
So here actualcurrentdate
class is now bound to only value of input field which is only changed when date actually is clicked on calendar/changed through input manually.