The Now Platform® Washington DC release is live. Watch now!
03-06-2018 06:38 AM
So we have this nice service portal widget date picker:
<sp-date-picker ng-model="data.datePicker" sn-change="customDate()"></sp-date-picker>
Do we have a date/time picker OOB?
Solved! Go to Solution.
03-06-2018 11:17 AM
I was able to use the same picker with time by adding the sn-include-time="true" parameter?
03-06-2018 11:17 AM
I was able to use the same picker with time by adding the sn-include-time="true" parameter?
03-07-2018 03:52 AM
You're the hero of the day. How did you come across that info?
03-07-2018 08:10 AM
Hi David, I first checked the sp_includes.js to even know it existed.
File: https://myinstance.service-now.com/scripts/js_includes_sp.js
Section: /*! RESOURCE: /scripts/app.$sp/directive.spDatePicker.js */
Looking in there, I see the template had the snIncludeTime:
restrict: 'E', replace: true, require: '?ngModel', scope: { field: '=', snDisabled: '=', snIncludeTime: '=', snChange: '&' },
03-07-2018 10:32 AM
Well, that makes sense. And right along those same lines, you have any clues on this one?
<sp-date-picker> keeps throwing 'isInvalid' error everywhere