【发布时间】:2014-06-25 04:04:28
【问题描述】:
我正在使用http://eternicode.github.io/bootstrap-datepicker/。我正在将数据库中的数据绑定到该字段,如下所示。
<input class="form-control datepicker" name="expense_date" value="${exp.expenseDate}" required="required">
脚本
<script src="js/bootstrap-datepicker.js"></script>
<script>
$('.datepicker').datepicker({
format : 'yyyy-mm-dd'
});
</script>
但从数据库中检索的日期在此字段中显示为Wed Jun 18 00:00:00 IST 2014。我需要显示为2014-06-18。
我该怎么做?
【问题讨论】:
标签: jquery twitter-bootstrap datepicker twitter-bootstrap-3