I know there's no official bootstrap timepicker and datepicker implementations.
I'm having dificulties implementing timepicker and datepicker Javascript on my code. I've tried several different libs and though some seem to work better than others, I still can't get them just right.
For time, in need it to return a value of, say, "23:58"
and for date, I need it to return an example value of "22/04/2016"
.
What are decent implementations of these features to use?
EDIT
As per one answer, I decided to give momentjs.com a try, but it's not working.
My script and component codes are:
<script type="text/javascript" >
$(document).ready(function () {
$('#datepicker0').moment({
language: 'pt-BR'
});
// more scripts
</script>
<div class="header">
<label th:for="datepicker0" th:value="${executionDate}">Execution Date: </label>
</div>
<div class="form-group input-group">
<input id="datepicker0" type="text" name="executionDate" th:field="*{executionDate}" class="form-control date-picker"></input>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
Now, all scripts in the // more scripts
area ceased to work.
I got both moment.js and moment-with-locales.js files from momentjs.com home page.
Is this right? What's the correct syntax?
This may work:
https://github.com/Eonasdan/bootstrap-datetimepicker
It is built on top of Moment.js and jQuery.
It has a format option as shown here in documentation:
http://eonasdan.github.io/bootstrap-datetimepicker/Options/#options