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
‎10-16-2019 11:57 PM
Hi Jamsta,
Did you find any solution for this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2019 12:05 AM
Hi
Can you check with this once -
<div>
<sp-date-picker field="c.data.datePicker" ng-model="{{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
‎01-08-2020 11:01 AM
Has anyone found the solution to this? I'm using the date picker in a modal but it doesn't seem to save the date to my record on the server side.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2021 09:13 AM
In the HTML template:
<sp-date-picker field="c.fromDate" ng-model="c.fromDate.value" ng-model-options="{getterSetter: true}"></sp-date-picker>
Client Controller:
c.fromDate = {
displayValue: '',
value: '',
name: '',
id: 'fromDate',
placeholder: 'From Date'
};
On change, The value can be obtained from c.fromDate.value;