I'm using bootstrap 3 date/time picker here:
https://eonasdan.github.io/bootstrap-datetimepicker/
Is it possible to customise the output text in the date/time text field? I wish to add a string at the start, such as 'Departure:'.
My current set up is very simple, the javascript is simply:
$('#datetimepicker').datetimepicker({defaultDate:'now',ignoreReadonly: true });
$('#datetimepicker').data("DateTimePicker").format('DD/MM/YYYY HH:mm:ss');
The HTML is:
<div class="form-group" style = "margin-bottom:4px;">
<div class='input-group date' id='datetimepicker'>
<input type='text' class="form-control" readonly='readonly'/>
<span class="input-group-addon" style="padding: 6px 11.5px;">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
This will display the date and time as per the formatting given in the code. How can I add the string Departing: to the beginning of the text field?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…