Angular-ui bootstrap datepicker“Today”按钮以错误的格式将日期发送到后端

时间:2015-03-04 09:33:27

标签: angularjs angular-ui-bootstrap

我们正在使用Angular-ui bootstrap datepicker如下:

template : '<div class="datepicker"> <input grid-cell-validatable type="text" datepicker-popup="dd-MMMM-yyyy" ng-model="cell.value" is-open="opened" min="minDate" ng-disabled="row.readonly" date-input-parser/> <button class="btn btn-mini btn-calendar icon-calendar" ng-click="open()"></button> </div>'

当我使用日历日期单元选择日期时,它会在&#34; dd-MMMM-yyyy&#34;中发送日期。格式,但如果我使用&#34;今天&#34;选择日期来自页脚的按钮,它在UI单元格中显示日期选择为&#34; dd-MMMM-yyyy&#34;格式,但在后端的java类中,格式发送为&#34; yyyy-MM-dd HH:mm:ss&#34;。

我该如何解决这个问题并获得&#34; dd-MMMM-yyyy&#34;到处格式化。

当我使用Firebug进行调试时,点击&#34; Today&#34;按钮值本身设置在&#34; yyyy-MM-dd HH:mm:ss&#34;格式虽然在UI上我看到&#34; dd-MMMM-yyyy&#34;在单元格中的日期。如何更改此设置并在&#34; dd-MMMM-yyyy&#34;中设置值。格式?

0 个答案:

没有答案