diff --git a/index.html b/index.html index e1c7699..093ec12 100644 --- a/index.html +++ b/index.html @@ -168,9 +168,12 @@ if (agent.indexOf('msie')>0 || agent.indexOf('trident')>0) { alert("Internet Explorer には対応していません"); } - today = new Date(Date.now()); - today_str = today.getFullYear() + "/" + ("0"+(today.getMonth() + 1)).slice(-2,3) + "/" + (today.getDate()); - document.querySelector("#input_01").value = today_str; + var datepick = document.querySelector("#input_01"); + if (datepick.value == "") { + today = new Date(Date.now()); + today_str = today.getFullYear() + "/" + ("0"+(today.getMonth() + 1)).slice(-2,3) + "/" + (today.getDate()); + datepick.value = today_str; + } timechanged(); filter();