This is a migrated thread and some comments may be shown as answers.

Angular set date/time picker options through controller

1 Answer 75 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 30 Jul 2015, 07:57 PM

I am having issues trying to set my date time picker from my controller object in angular.

here is my input object:

<input kendo-date-time-picker
                   style="width:100%;"
                   type="text"
                   k-options="ctrl.dateTimeOptions"
                   k-ng-model="ctrl.date" />

 

This is the object I have created for the options:

ctrl.dateTimeOptions = {
                            format: "'MM/dd/yyyy HH:mm'",
                            timeFormat: "'HH:mm'",
                            parseFormats: "['yyyy-MM-ddTHH:mm:ss']"
                        };

 

Is there something I have set up wrong?

1 Answer, 1 is accepted

Sort by
0
Stephen
Top achievements
Rank 1
answered on 30 Jul 2015, 09:22 PM
Got it working. Had to change where I was setting my object.
Tags
Date/Time Pickers
Asked by
Stephen
Top achievements
Rank 1
Answers by
Stephen
Top achievements
Rank 1
Share this question
or