Angular-UI date picker is in invalid state when specified the date format as 'd-M-yyyy' and ng-model with a string value as “2014-08-31T00:00:00Z”

后端 未结 7 2121
借酒劲吻你
借酒劲吻你 2021-02-15 23:49

I am getting a date time value from asp.net mvc controller as \"2014-08-31T00:00:00Z\". When I bind this value to my angular-ui datepicker control it\'s state is showing as ng-i

7条回答
  •  说谎
    说谎 (楼主)
    2021-02-16 00:17

    I solved the problem by converting string to valid javascript formt in directive:

    see here: Datepicker-popup formatting not working when value set initially in scope

提交回复
热议问题