datepick - day of the week bug

This commit is contained in:
Miroslav Šedivý 2019-12-18 23:22:59 +01:00
parent f66fc0c524
commit 91182f5c0d
2 changed files with 6 additions and 1 deletions

View file

@ -38,6 +38,6 @@ pass = demo
[system]
system_name = blog
version = 1.16
version = 1.17
debug = true
logs = false

View file

@ -98,6 +98,11 @@ var datepick = function(container) {
// Get first day of week
var dayOfWeek = new Date(this.y, this.m, 1).getDay();
// 0 is sunday - last day
if(dayOfWeek == 0) {
dayOfWeek = 7;
}
// Previous month
this.dec_m();