Need help with sp-date-picker directive

AK57
Kilo Explorer

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.

13 REPLIES 13

Hi Jamsta,

Did you find any solution for this?

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>

 

 

Ashley Snyder1
Giga Guru

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.

Community Alums
Not applicable

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;