为什么angularjs引导日期选择器挑的前一天? [英] Why does angularjs bootstrap datepicker pick one day before?
本文介绍了为什么angularjs引导日期选择器挑的前一天?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用 angularjs引导日期选择器指令
当我从模型中设置一个日期则会选取选定日期的前一天。
I'm using angularjs bootstrap datepicker directive and when I set a date from model it picks a day before the selected date.
<button type="button" class="btn btn-sm btn-default" ng-click="dt = '2014-09-24'">2014-09-24</button>
下面是一个普拉克这个问题。
请问有什么解决办法吗?
Is there any solution?
推荐答案
这是由于JS的方式处理日期本身。 AngularUI队提到了这个在文档。
This is due to the way JS handles dates natively. AngularUI team mentions this in the docs.
下面是一个解决办法:<一href=\"http://stackoverflow.com/questions/15226766/angular-ui-one-day-is-subtracted-from-date-in-ui-date\">Angular-UI有一天,从日期中减去在UI最新
Here's one solution: Angular-UI One day is subtracted from date in ui-date
这篇关于为什么angularjs引导日期选择器挑的前一天?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文