Angular-UI One day is subtracted from date in ui-date

后端 未结 4 1490
慢半拍i
慢半拍i 2020-12-10 19:56

The situation I want to use ui-date to set/edit a date in my app. I use the latest stable versions of angular, angular-ui, jquery-ui etc.

Th

4条回答
  •  温柔的废话
    2020-12-10 20:41

    ui-date expects your model to be an actual date object. In your case it's a string. If you take a look at the console you'll see that angularUI actually informs you about that. Then it advises you to add additional ui-date-format tag with the specified date format with which your date string will be parsed into date object.

    Long story short, your need to adjust your input as this:

    
    

    Working plunker.

提交回复
热议问题