Is it possible to have a date picker where only 1 day a month
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 01:58 AM
Scenario is I want a date picker with only 1 date to be selectable per month, so the other dates are greyed out. Anyone any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2025 05:16 AM
If they can select only 1 date always in the month then what's the point in asking them to select?
why not set the default value when form loads and make that variable/field readonly?
For example: if the current month is Jan and you wish to set 22nd as the date this is possible
if the current month is Feb and you wish to set 23rd then this is possible
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2025 05:33 AM
@Ankur Bawiskar maybe my scenario wasn't clear enough. The dates available to select could be random day that will be controlled somewhere else.
I though that a choice list maybe the best option, it'd have probably reference a custom table like below, which denotes what dates can be available. I was just hoping there was a simplish way of displaying this on a date picker rather than a a choice list
Active | Date |
FALSE | 20/01/2025 |
TRUE | 24/01/2025 |
TRUE | 01/01/2025 |
TRUE | 17/02/2025 |
TRUE | 02/03/2025 |
TRUE | 11/03/2025 |
TRUE | 30/03/2025 |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2025 06:06 AM
2 ways
1) have onChange client script + GlideAjax and validate the selected date against the dates allowed
OR
2) Simply have choice list with those choices (easiest approach)
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2025 06:29 AM
Yeah thats what I already expected so not really the solution I was after ☹️