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


source to share





All Articles