Hello All,
I am using the datepicker in editable mode. When i try to enter the date manually 25121997 in DDMMYYY format it automatically converts to different date 01/21/1999.
link and oml attached here URL
Refered many workarounds but it doesn't give appropriate result.
https://www.outsystems.com/forums/discussion/82276/manually-input-datepicker-changes-input-date-to-other-date/
Can anyone suggest how can we fix this issue
Regards,
Ellakkiya.S
The newDatepicker is set to "MM/DD/YYYYY".
Hi Masahiro Ohno ,
I have changed the date format to "DD/MM/YYYY".
But still causing the same issue
Hi Ellakkiya,
I think you should enter date with / as a delimiter to separate day month and year then it will work fine.
Hope it helps.
Thanks
Hi Jozy Sohail,
Yes if we enter date with delimiter then it will work fine.
But out client is asking for user friendly, without delimiter also it should work fine.
Rightnow it is not working without delimiter
If it isn't able to consume the input without slashes then it should error, not apparently come back with a random date (since even mm/dd/yyyy doesn't explain it e.g. 01011980 becomes 01/11/1980 ?!)
Did you find a solution for this?
Best regards,
Clarisse
I'm not sure if the problem is exactly the same, but I found this topic:https://www.outsystems.com/forums/discussion/82276/outsystems-ui-manually-input-datepicker-changes-input-date-to-other-date/ Solution - that worked for me - was to create an 'OnInitialize' screen action with the following JavaScript:setTimeout(function() { var datePickerInpt = document.getElementById($parameters.DatePickerInputId).querySelector('.input'); datePickerInpt.addEventListener('input', function() { let v = this.value.replace(/\D/g, ''); // only numbers if (v.length === 8) { this.value = v.slice(0,2) + '-' + v.slice(2,4) + '-' + v.slice(4); } });}, 100);