Good afternoon guys I have a problem with my datepicker plugin I'm only using month and year in it, and by selecting a month and a year, the month instead of coming in number, for example 02, that is, February, it comes in string, and English still. How can I solve this problem? Here are the code:
--- NOT MY HTML IS THAT JS: ---
<script>
$(function () {
$('.date-picker').datepicker({
changeMonth: true,
changeYear: true,
showButtonPanel: true,
dateFormat: 'MM yy',
onClose: function (dateText, inst) {
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
$(this).datepicker('setDate', new Date(year, month, 1));
}
});
});
</script>
--- WHERE DO I WANT DATEPICKER TO APPEAR ---
<p><label for="startDate">Data:</label></p>
<p><input name="startDate" id="startDate" class="date-picker" type="data" name="parametro3" id="calendario" value="Ex.: 30/05/2010" onBlur="if(this.value=='')this.value='Ex.: 30/05/2010'" onFocus="if(this.value=='Ex.: 30/05/2010')this.value=''"></p>
--- NO MY CSS ---
.ui-datepicker-calendar {
display: none;
}
This solution, I found right here in the forum Thank you for your patience. Thanks