[英]bootstrap date time picker change format
I'm using a bootstrap date time picker to select a date with the time his format is like this mm/dd/yyyy hh:ii i want to change this format to dd/mm/yyyy hh:ii 我正在使用引导日期时间选择器来选择日期,其格式为mm / dd / yyyy hh:ii,我想将此格式更改为dd / mm / yyyy hh:ii
I had used this method but i didn't have the format i want the same format still appear 我曾经使用过这种方法,但是我没有格式,但我仍然希望出现相同的格式
<script type="text/javascript">
$(function () {
$('#datetimepicker1').datetimepicker({
format: "dd/mm/yyyy hh:ii"
});
});
</script>
Html Code: HTML代码:
<input type="text" value="" id="datetimepicker1" name="txt_padd"
placeholder="Actual Date" class="form-control input-md" onchange="call()"
onkeyup="saveValue(this);" >
How Can i Change the format of this datetimepicker ??!! 我如何更改此datetimepicker的格式?
Try this one 试试这个
//HTML Code with iconic view
<div class="form-group">
<label class="control-label col-md-4">Datetime Picker</label>
<div class="col-md-8">
<div class="input-group date" id="datetimepicker1">
<input type="text" class="form-control" />
<span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> </div>
</div>
</div>
//Javascript Code
<script type="text/javascript">
$(function() {
$('#datetimepicker1').datetimepicker({
format: 'DD/MM/YYYY HH:mm'
});
});
</script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.