|
|
|
|
@ -512,16 +512,37 @@
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 格式化时间日期
|
|
|
|
|
* @param date
|
|
|
|
|
* @praem 格式
|
|
|
|
|
*/
|
|
|
|
|
function dateFormat(date, format = "YYYY-MM-DD HH:mm:ss") {
|
|
|
|
|
const config = {
|
|
|
|
|
YYYY: date.getFullYear(),
|
|
|
|
|
MM: date.getMonth() + 1,
|
|
|
|
|
DD: date.getDate(),
|
|
|
|
|
HH: date.getHours(),
|
|
|
|
|
mm: date.getMinutes(),
|
|
|
|
|
ss: date.getSeconds()
|
|
|
|
|
};
|
|
|
|
|
for (const key in config) {
|
|
|
|
|
format = format.replace(key, config[key]);
|
|
|
|
|
}
|
|
|
|
|
return format;
|
|
|
|
|
}
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
|
const today = dateFormat(new Date(),"YYYY-MM-DD")
|
|
|
|
|
flatpickr("#starting_date", {
|
|
|
|
|
dateFormat: "Y-m-d",
|
|
|
|
|
altInput: true,
|
|
|
|
|
altFormat: "F j, Y",
|
|
|
|
|
disableMobile: true,
|
|
|
|
|
// minDate: "today"
|
|
|
|
|
minDate:new Date()
|
|
|
|
|
minDate:"today",
|
|
|
|
|
onReady:function(selectedDates, dateStr, instance){
|
|
|
|
|
instance.config.minDate = today
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var quick_inquiry_form = document.getElementById('quick_inquiry_form');
|
|
|
|
|
var quick_inquiry_button = document.getElementById('quick_inquiry_button');
|
|
|
|
|
|
|
|
|
|
|