hi,
I want to this format of date. If I input “55” as month than it should be “05” as month If month is grater then “12” . According to my below code if in input “55 ” as date /time month become “12” and date become “30”
but it should be 05 as month and 05 as date
//Set date input
$(“#dtPickerAddDate”).jqxDateTimeInput({ width: ‘145px’, height: ’22px’, theme: ‘default’, formatString: “MM/dd/yyyy” });
var getDate = $(‘#dtPickerAddDate’).jqxDateTimeInput(‘getDate’);
var formattedDate = $.jqx.dataFormat.formatdate(getDate, ‘MM/dd/yyyy’);
if ($(“#hdnVisitDate”).val() != ”) {
formattedDate = $.jqx.dataFormat.formatdate($(“#hdnVisitDate”).val(), ‘MM/dd/yyyy’);
$(‘#dtPickerAddDate’).jqxDateTimeInput(‘setDate’, new Date(formattedDate));
}
else {
$(“#hdnVisitDate”).val(formattedDate);
}
$(‘#dtPickerAddDate’).on(‘valuechanged’, function (event) {
var jsDate = event.args.date;
var formattedDate1 = $.jqx.dataFormat.formatdate(jsDate, ‘MM/dd/yyyy’);
$(“#hdnVisitDate”).val(formattedDate1);
});
Thanks Regard’s
Anil Kumar