How to Set Dafult value in the date picker Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2024 01:30 AM - edited ‎02-02-2024 01:31 AM
I want to prefill today's date in the date picker field in the Service Portal. Is there a possibility?
Html
<sp-date-picker field="::spDatePickerConfig.startTime || {}" sn-min-date="min" ng-model="start.value" sn-include-time="false" sn-change="timeChange(start)"> </sp-date-picker>
client script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2024 01:47 AM
where are you using that? on catalog form?
please share some details
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2024 01:58 AM
Hi @Ankur Bawiskar ,
I am doing it on the service portal custom widget!
This Date picker field should be prefilled with today's date.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2024 02:25 AM
why to have custom widget when you have already OOB date variable?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader