Hello,
I'm applying the anypicker on a textbox into a popup. So there is current date is showing by default php code. So selected date should work, as it is working in chrome. But in firefox it is scrolling once like the image below
Here is my code
//Set date time picker
var curFullDate = new Date();
var curYear = curFullDate.getFullYear();
if (userAgent !== "") { //Firefox
var monthArr = [
"January",
"Febary",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
];
var curMonth = curFullDate.getMonth();
curMonth = monthArr[curMonth];
} else {
var curMonth = curFullDate.getMonth() + 1;
}
console.log(curMonth);
var curDate = curFullDate.getDate();
var curHours = curFullDate.getHours();
var curAP = (curHours > 12) ? "PM" : "AM";
if (userAgent === "") {
curHours = (curHours > 12) ? curHours - 12 : curHours;
}
curHours = (curHours > 9) ? curHours : "0" + curHours;
var curMinutes = curFullDate.getMinutes();
var curSeconds = curFullDate.getSeconds();
curMinutes = (curMinutes > 9) ? curMinutes : "0" + curMinutes;
Hello, I'm applying the anypicker on a textbox into a popup. So there is current date is showing by default php code. So selected date should work, as it is working in chrome. But in firefox it is scrolling once like the image below
Here is my code
//Set date time picker var curFullDate = new Date(); var curYear = curFullDate.getFullYear(); if (userAgent !== "") { //Firefox var monthArr = [ "January", "Febary", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", ]; var curMonth = curFullDate.getMonth(); curMonth = monthArr[curMonth]; } else { var curMonth = curFullDate.getMonth() + 1; } console.log(curMonth); var curDate = curFullDate.getDate(); var curHours = curFullDate.getHours(); var curAP = (curHours > 12) ? "PM" : "AM"; if (userAgent === "") { curHours = (curHours > 12) ? curHours - 12 : curHours; } curHours = (curHours > 9) ? curHours : "0" + curHours; var curMinutes = curFullDate.getMinutes(); var curSeconds = curFullDate.getSeconds(); curMinutes = (curMinutes > 9) ? curMinutes : "0" + curMinutes;
Here is the applyDateTimePicker function
$.fn.applyDateTimePicker = function(data) { var minDate =new Date(); var maxDate = new Date(); var theme = "Default", userAgent = navigator.userAgent;
};
Please try to give me solution as soon as possible