You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, my problem is that inputs appear Persian date without zeros . for example if the number of a day or a month be less than 10 this appears only single number like 7 . but I need persian date in this cases write 07 in input .
The text was updated successfully, but these errors were encountered:
onSelect: function() {
var strr = $("#FromDate").attr("data-jdate");
if ((strr.length) < 10) {
var res = strr.split("/");
var result = "";
for (var i = 0; i < 3; i++) {
var l = res[i];
if ( l.length < 2)
res[i] = "0" + res[i];
if (result.length < 8)
result = result + res[i] + "/";
else
result = result + res[i];
}
console.log(res);
$("#FromDate").attr("data-jdate", result);
$("#FromDate").val(result);
}
}
Hello, my problem is that inputs appear Persian date without zeros . for example if the number of a day or a month be less than 10 this appears only single number like 7 . but I need persian date in this cases write 07 in input .
The text was updated successfully, but these errors were encountered: