【发布时间】:2021-10-05 01:24:51
【问题描述】:
在我的 laravel 应用程序中,我使用的是 bootstrap 4。
我有一个表格,我有一个用于 picj thebirthday 的文本字段
{!! Form::date('date_of_birth', null, array('placeholder' => __('texts.Date of birth'),'class' => 'form-control txt_txt','id'=>'from-datepicker')) !!}
这给了我mm/dd/yyyy格式的日期
但我需要我的约会是yyyy-mm-dd
我什至尝试过使用
<script>
jQuery("#from-datepicker").datepicker({format: 'yyyy-mm-dd'});
</script>
但这也给了我一个 JavaScript 错误说datepicker is not a function
如何将我的日期选择器格式设置为 yyyy-mm-dd
【问题讨论】:
-
stackoverflow.com/questions/27255392/… 这能回答你的问题吗?
标签: javascript php html jquery twitter-bootstrap