javascript - how to change jquery datepicker to US datepicker -
this datepicker div , want change datepicker 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>
on format argument use
format : 'mm/dd/yyyy'
Comments
Post a Comment