Need help with sp-date-picker directive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2018 07:33 AM
Can someone please give an example on using the sp-date-picker directive with sn-include-time=true ?
I have tried to use it but the server script never catches the values from the html. How should the client controller look like in order to get this working ?
Thanks.
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2019 04:06 AM
In the html you can bind to the server variable with c.data.datePicker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2019 04:13 AM
Hi Tommy,
Thanks for your reply. But I have to now ask... how do I do that? Ultimately I'm just trying to get to a place where the user can pick a date, the date sticks in the picker, and then I can make use of the date they've selected on the server side.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2019 04:27 AM
Try this html
<div>
<sp-date-picker field="c.data.datePicker" ng-model="c.data.datePicker" sn-change="customDate()" sn-include-time="true"></sp-date-picker>
</div>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2019 04:29 AM
Hi Tommy,
This gives the same result unfortunately. The selected date immediately disappears.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2019 05:41 AM
In your server script remove:
data.datePicker="";
and see if that is better