I have two text boxes.One is for taking StartDate from a islamic calender,so i am using jQuery Calendars Datepicker. The ExpireDate textbox will automatically 60days from StartDate.so i am writing the logic in Onclose event of datepicker.
$(document).ready(function () {
ShowCalender();
});
function ShowCalender() {
var calendar = $.calendars.instance('islamic');
$('[id$=TxtOrderDate]').calendarsPicker({
calendar: calendar,
onClose: function (dates) {
var expiryDate = new Date(dates);
var x = 60;
expiryDate.setDate(expiryDate.getDate() + x);
document.getElementById('<%=TxtExpirationDate.ClientID%>').value = expiryDate;
},
showTrigger: '<img src="../../../_layouts/15/1033/Saudia/Images/calender.png" alt="Popup" class="trigger img">'
});
}
but here the ExpireDate fill with Date Sun Apr 24 03:00:00 UTC+0300 1436,which is a gregorian date. expiredate mustbe the islamic Date.
How to add specific number of Days in FromDate? Please help.
Aucun commentaire:
Enregistrer un commentaire