I placed on my site in asp.net the datepicker of this site and I want to receive the value as Date instead of String, so that it does not trouble with the date type of other countries.
/* Brazilian initialisation for the jQuery UI date picker plugin. */
/* Written by Leonildo Costa Silva ([email protected]). */
( function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "../widgets/datepicker" ], factory );
} else {
// Browser globals
factory( jQuery.datepicker );
}
}( function( datepicker ) {
datepicker.regional[ "pt-BR" ] = {
closeText: "Fechar",
prevText: "<Anterior",
nextText: "Próximo>",
currentText: "Hoje",
monthNames: [ "Janeiro","Fevereiro","Março","Abril","Maio","Junho",
"Julho","Agosto","Setembro","Outubro","Novembro","Dezembro" ],
monthNamesShort: [ "Jan","Fev","Mar","Abr","Mai","Jun",
"Jul","Ago","Set","Out","Nov","Dez" ],
dayNames: [
"Domingo",
"Segunda-feira",
"Terça-feira",
"Quarta-feira",
"Quinta-feira",
"Sexta-feira",
"Sábado"
],
dayNamesShort: [ "Dom","Seg","Ter","Qua","Qui","Sex","Sáb" ],
dayNamesMin: [ "Dom","Seg","Ter","Qua","Qui","Sex","Sáb" ],
weekHeader: "Sm",
dateFormat: "dd/mm/yy",
firstDay: 0,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: "" };
datepicker.setDefaults( datepicker.regional[ "pt-BR" ] );
return datepicker.regional[ "pt-BR" ];
} ) );
$(function() {
$("#datepicker").datepicker();
});
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script><scriptsrc="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<p>Date: <input type="text" id="datepicker"></p>
Can someone help me?