這是我的datepicker div,我想將此datepicker更改爲美國的datepicker。如何將jquery datepicker更改爲US datepicker
$(document).ready(function() {
// $(document).on("click", "#datetimepicker3", function (e) {
// $('#datetimepicker2').focus();
$('#datetimepicker2 , #datetimepicker3')
.datepicker({
autoclose: true,
// endDate: '+0d',
format: 'yyyy/mm/dd',
todayHighlight: true,
//startDate: '+0d'
startDate: Date().toLocaleString()
})
.on('changeDate', function(e) {
$('#datetimepicker2').datepicker('hide');
$('#GuestSearchForm').bootstrapValidator('revalidateField', 'Servicedate');
});
});
<div class="col-lg-3 col-sm-6 home-date">
<div class="form-group">
<div class="input-group input-append date" id="datetimepicker3" align="center">
<input type="text" class="form-control" name="Servicedate" id="datetimepicker2" autocomplete="off" placeholder="Select date" readonly>
<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
</div>
</div>
</div>
閱讀文件?我會假設默認格式是美國 - 如果您刪除格式:'yyyy/mm/dd',' – mplungjan