You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In calendar when readonly is set to false and user can manually enter date, this check doesn't work properly when date format is set to YYYY-MM-DD. When you try enter eg. 2022 calendar automatically set different date.
It works properly when below function will be change from:
var keyUpControls = function(e) {
if (e.target.value && e.target.value.length > 3) {
var test = jSuites.calendar.extractDateFromString(e.target.value, obj.options.format);
if (test) {
obj.setValue(test);
}
}
}
to:
var keyUpControls = function(e) {
if (e.target.value && e.target.value.length == 10) {
var test = jSuites.calendar.extractDateFromString(e.target.value, obj.options.format);
if (test) {
obj.setValue(test);
}
}
}
or dateformat.length instead of 10.
The text was updated successfully, but these errors were encountered:
dawid520
changed the title
Function keyUpControls in calendar cause a problems for YYYY-DD-MM date format
Function keyUpControls in calendar cause problems for YYYY-DD-MM date format
Jul 27, 2022
In calendar when readonly is set to false and user can manually enter date, this check doesn't work properly when date format is set to YYYY-MM-DD. When you try enter eg. 2022 calendar automatically set different date.
It works properly when below function will be change from:
var keyUpControls = function(e) {
if (e.target.value && e.target.value.length > 3) {
var test = jSuites.calendar.extractDateFromString(e.target.value, obj.options.format);
if (test) {
obj.setValue(test);
}
}
}
to:
var keyUpControls = function(e) {
if (e.target.value && e.target.value.length == 10) {
var test = jSuites.calendar.extractDateFromString(e.target.value, obj.options.format);
if (test) {
obj.setValue(test);
}
}
}
or dateformat.length instead of 10.
The text was updated successfully, but these errors were encountered: