9
I have the following date field:
<div class='input-group date input-data' id='datetimepicker4'>
<input type='text' name="mes" id="mes" class="form-control hidden" />
<span class="input-group-addon hidden">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
$('#datetimepicker4').datetimepicker({
format: 'MMMM-YYYY',
locale: 'pt-br',
defaultDate: new Date()
});
In this format is displayed: September-2016. How to display in this format and then convert to 01/09/2016?
Tried using an option called
formatDate: 'Y/m/d'
?– Diego Souza
On the server, who will process this information? PHP, Java... ?
– Kenny Rafael
It happened to me and I had to use the plugin
moment
to solve my problem by selecting a date.– Diego Souza
@Kennyrafael php
– Bia
In this case it would be possible to send as in the view and treat on the side in PHP or you want to treat already on the screen for the user?
– Kenny Rafael
Because it would display both ways, but I believe that dealing with PHP already solves even.
– Bia
A variation of bootstrap datetimepicke, I found very complete, https://uxsolutions.github.io/bootstrap-datepicker/
– MarceloBoni