bootstrap-datetimepicker icon indicating copy to clipboard operation
bootstrap-datetimepicker copied to clipboard

onRenderHour issue?

Open dkruchok opened this issue 7 years ago • 0 comments

I have a strange issue or maybe I doing something wrong. date not return 24 numbers. How can I figure out with this?

onRenderHour: function(date) {
            	if (date.getDay() === 0 || date.getDay() === 6) { //for weekends

            		console.log(date.getHours()); // return 3...23
            		console.log(date.getUTCHours()); // return 0...20

            		if (date.getUTCHours() >= 2 && date.getUTCHours() <=23)
          		 return ['disabled']; // issue 21,22,23 still open...
          		}

          	}

issue

UPDATE This issue was caused by this statement if (date.getDay() === 0 || date.getDay() === 6) {} I don't know the reasone but out of the condition it works fine.

dkruchok avatar Apr 02 '17 09:04 dkruchok