Fixed datepicker appearing 4 months later, fixed #45

This commit is contained in:
Kenneth Jao 2016-08-20 21:29:11 -04:00
parent 1f1a9fa0a3
commit 0de9853dc4

View File

@ -392,7 +392,7 @@ Template.main.events({
input.typ = "text"; input.typ = "text";
input.style.height = 0.9 * dim.height.toString() + "px"; input.style.height = 0.9 * dim.height.toString() + "px";
} }
input.value = ele.childNodes[0].nodeValue; if(!event.target.id === "workDate") input.value = ele.childNodes[0].nodeValue;
input.className = "changeInput"; input.className = "changeInput";
input.style.width = "70%"; input.style.width = "70%";
@ -508,8 +508,9 @@ Template.main.events({
'focus #workDatea' () { 'focus #workDatea' () {
$('#workDatea').datepicker({ $('#workDatea').datepicker({
format: 'DD, MM d, yyyy', format: 'DD, MM d, yyyy',
startDate: (new Date(Date.now())).toISOString().slice(0,10), startDate: 'd',
todayHighlight: true, todayHighlight: true,
todayBtn: true,
autoclose: true autoclose: true
}); });
}, },