datetimepicker icon indicating copy to clipboard operation
datetimepicker copied to clipboard

disabled change value when scroll.

Open kdmakwana43 opened this issue 8 years ago • 1 comments

when i'm try to scroll month value is changed. how to stop it?

kdmakwana43 avatar Oct 06 '16 09:10 kdmakwana43

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.

Shashank-Bhatt1 avatar Feb 25 '22 09:02 Shashank-Bhatt1