M Mahares Expert Licensed User Longtime User Dec 9, 2020 #2 admerc said: how to prevent selecting gray/invalid days Click to expand... If by saying gray/invalid days you mean dates before today's date, you can then use the below code. which disallows selecting any date prior to today's date. If not, please put a little code or explain further exactly what you mean. Code: Sub AnotherDatePicker2_DateChanged (NewDate As Long) If NewDate < DateTime.Now Then AnotherDatePicker2.Date = DateTime.Now End If End Sub There is also B4XDateTemplate in XUI Views you can use Upvote 0
admerc said: how to prevent selecting gray/invalid days Click to expand... If by saying gray/invalid days you mean dates before today's date, you can then use the below code. which disallows selecting any date prior to today's date. If not, please put a little code or explain further exactly what you mean. Code: Sub AnotherDatePicker2_DateChanged (NewDate As Long) If NewDate < DateTime.Now Then AnotherDatePicker2.Date = DateTime.Now End If End Sub There is also B4XDateTemplate in XUI Views you can use
M MikeSW17 Active Member Licensed User Longtime User Dec 9, 2020 #3 Not sure which version of AnotherDatePicker you're using. Neither of the example programs [ the Depreciated: https://www.b4x.com/android/forum/t...epicker-a-simple-web-style-date-picker.27548/ or the replacement XUI Views version: https://www.b4x.com/android/forum/t...ss-platform-views-and-dialogs.100836/#content ] look like your example - there are no grey dates. Only the valid dates for the month are displayed. Clicking anywhere other than a displayed date does nothing. I'm not familiar with ADP, bur maybe there is a setting to alter the behaviour you/I see. No doubt looking at the linked examples and comparing with your usage will reveal all. Upvote 0
Not sure which version of AnotherDatePicker you're using. Neither of the example programs [ the Depreciated: https://www.b4x.com/android/forum/t...epicker-a-simple-web-style-date-picker.27548/ or the replacement XUI Views version: https://www.b4x.com/android/forum/t...ss-platform-views-and-dialogs.100836/#content ] look like your example - there are no grey dates. Only the valid dates for the month are displayed. Clicking anywhere other than a displayed date does nothing. I'm not familiar with ADP, bur maybe there is a setting to alter the behaviour you/I see. No doubt looking at the linked examples and comparing with your usage will reveal all.