The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

<sp-date-picker>

xiaix
Tera Guru

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?

 

 

1 ACCEPTED SOLUTION

J Trunnelle
Tera Expert

I was able to use the same picker with time by adding the   sn-include-time="true"   parameter?

View solution in original post

5 REPLIES 5

J Trunnelle
Tera Expert

I was able to use the same picker with time by adding the   sn-include-time="true"   parameter?

You're the hero of the day.  How did you come across that info?

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: '&'
},

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