Why is my model property Date not showing up in this input box?

My model has a Date type property (vm.reportSchedule.StartSchedule) set today.

I need to format a date to display in this type text input field.

I am using this directive from Plunker: http://plnkr.co/edit/R16IPQ?p=preview

I added a link to moment.js and using the required HTML syntax:

<input type="text" ng-model="vm.reportSchedule.StartSchedule" 
       mo-date-input="MM/DD/YYYY hh:mm A" readonly required />

      

The date is not displayed in this field for some reason.

By the way, in this plunker, if you get rid of the ng-repeat, this works stoppes, I don't understand why.

No JS errors, date format string is correct.

enter image description here

The directive I copied from Plunker (no need to check, I just copied it from Plunker example):

It works great in Plunker.

Any help is appreciated. Thank.

+3
angularjs


source to share


No one has answered this question yet

Check out similar questions:

721
How do I set focus to an input field?
289
AngularJS - create directive that uses ng-model
3
How to get NgModelController for input fields inside ngRepeat directive?
2
Angle directive creating required readonly field
2
Input date type in AngularJS 1.3.0 format seems to be wrong
1
Compare and filter date data in MM / DD / YYYY format from current date using new date () while subtracting new date () from custom input value
1
Using personalized date date form on angular datepicker bootstrap
0
Angular UT Bootstrap Datapicker
0
UI Bootstrap Datepicker Popup Format
0
How to format date and time in AngularJS Datepicker data input field?



All Articles
Loading...
X
Show
Funny
Dev
Pics