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

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

Date Time Picker in Service Portal

aksm1
Kilo Contributor

I've found a date picker for service portal but I'm not sure how to set date time for the datepicker?         <sp-date-picker ng-model="your.model.value" sn-change=""></sp-date-picker>

2 REPLIES 2

Jon Barnes
Kilo Sage

in the html:



<sp-date-picker field="delivery" ng-model="delivery.value" ng-model-options="{getterSetter: true}" sn-disabled="false"></sp-date-picker>



somewhere in your client controller (the name must correspond to the "field" attribute on the sp-date-picker directive):



$scope.delivery = {


displayValue: '',


value: '',


name: 'delivery'


};



you can set the value/displayValue to something as a default if you want.


Ximizu1
Kilo Guru

Solution

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

 

Source of the solution in this thread

https://community.servicenow.com/community?id=community_question&sys_id=36f7b0b7db2057843882fb651f9619b9