PitPik / tinyDatePicker

NEW: Tiny javascript and jQuery date / time picker [datepicker]
http://www.dematte.at/tinyDatePicker/
MIT License
57 stars 14 forks source link

Crash #12

Open umbundu opened 6 years ago

umbundu commented 6 years ago

Greetings, If you erase the contents of the input field and then click on it again, the datepicker crashes.

Line 70:

                m.push(j[o ? "weekNo" : "row"].replace(/class="(.*?)"/, function(a, b) {
                    return 'class="' + d(b + " " + (o ? h.weekNoClass : (z === s ? h.currentMonthClass : p ? h.prevMonthClass : h.nextMonthClass) + " " + (A.join(" ").replace(/(\b\w+\s+)*\1/g, "$1") || "") + " " + (w ? h.todayClass : "") + " " + (h.workingDays.indexOf(r.getDay()) === -1 ? h.weekEndClass : ""))) + '"'
                }).replace(/{{day}}/g, o ? f(r) : q).replace(/{{day-event}}/g, q && j.day.call(c, q, r, x) || q).replace(/{{month}}/g, z + 1).replace(/{{year}}/g, r.getFullYear()).replace(/{{today}}/g, w && j.today.call(c, q, r) || "").replace(/{{event}}/g, x.length && j.event.call(c, q, r, x) || "")), o && r.setDate(r.getDate() - 1)
            }

Object does not support property or method call!

image