Hi everyone,The date picker’s maximum selectable date is set to the current date to prevent selection of future dates. This functionality works as expected on Android but does not behave correctly on iOS.How to solve this issue?
Please use currdatetime() instead of datetimenow(). I have updated the post as well.
The issue with the maximum selectable date not working correctly on iOS for the OutSystems date picker might result from either buggy behavior in previous OutSystems UI versions or specific compatibility issues with the device or browser rendering the date picker.
Here are some steps you can take to troubleshoot and fix the problem:
OutSystems UI Version Compatibility: Ensure that you are using the latest version of the OutSystems UI framework. Some bugs related to the DatePicker functionality were solved in newer releasesDatePicker not working properly.
Proper Date Format and Initialization:
yyyy-MM-dd
MaxDate
CurrDateTime()
Device-Specific Display Issues: Some iOS browsers might handle HTML5 date inputs differently. Test the feature across multiple browsers (Safari, Chrome, Firefox) on the iOS device to see if the issue is browser-specific.
Adjust CSS or JavaScript Logic:
Time Zone and Data Type:
If none of the above steps solve the issue, consider sharing detailed steps to replicate the issue and testing the behavior on a traditional browser debugger or OutSystems service studio emulator to isolate specific client-side issues for iOS.
Hi @Ruth Pugal ,
In iOS, the Reactive DatePicker evaluates the time part of a DateTime. If MaxDate is set to “today” at 00:00:00, iOS treats the current date as future once the time passes midnight (Android usually ignores the time).
Fix: set MaxDate to the end of today (23:59:59):
DateTimeAddSeconds( DateTimeAddDays(DateTimeToDate(CurrDatetime()), 1), -1)
Bind this to the DatePicker MaxDate (or compute it in OnInitialize).
Also check: update to the latest OutSystems UI version and regenerate the mobile app, as iOS DatePicker fixes are delivered via UI/runtime updates.
Hope this helps.
Regards,
Manish Jawla
Hi Manish Jawla ,The expression shows an error. Could you check it?
The future values are still visible after using the above method.