fix date issue

This commit is contained in:
Bomrah Harry 2023-10-16 00:39:21 +08:00
parent ddb8da9eca
commit 11e6cf516b
1 changed files with 2 additions and 2 deletions

View File

@ -321,7 +321,7 @@ $(".upload").on("change",function(){
$("#seminar_signup_signup_confirmed").on("change",function () {
if(this.checked){
dt = new Date();
format = dt.getFullYear() + "/" + dt.getMonth() + "/" + dt.getDate() + " " + dt.getHours() + ":" + dt.getMinutes();
format = dt.getFullYear() + "/" + (dt.getMonth() + 1) + "/" + dt.getDate() + " " + dt.getHours() + ":" + dt.getMinutes();
$("#seminar_signup_signup_confirmed_date").val(format);
}else{
$("#seminar_signup_signup_confirmed_date").val("");
@ -331,7 +331,7 @@ $("#seminar_signup_signup_confirmed").on("change",function () {
$("#seminar_signup_is_confirmed").on("change",function () {
if(this.checked){
dt = new Date();
format = dt.getFullYear() + "/" + dt.getMonth() + "/" + dt.getDate() + " " + dt.getHours() + ":" + dt.getMinutes();
format = dt.getFullYear() + "/" + (dt.getMonth() + 1) + "/" + dt.getDate() + " " + dt.getHours() + ":" + dt.getMinutes();
$("#seminar_signup_is_confirmed_date").val(format);
}else{
$("#seminar_signup_is_confirmed_date").val("");