pranav nachnekar | 7b9e309 | 2019-08-28 16:57:37 +0530 | [diff] [blame^] | 1 | |
2 | let holidays = []; | ||||
3 | {% if holidays %} | ||||
4 | holidays = {{holidays}} | ||||
5 | {% endif %} | ||||
6 | |||||
7 | function next() { | ||||
8 | let date = document.getElementsByName('appointment-date')[0].value; | ||||
9 | if(holidays.includes(date)){ | ||||
10 | frappe.throw("That day is a holiday") | ||||
11 | } | ||||
12 | let tz = document.getElementsByName('appointment-timezone')[0].value; | ||||
13 | window.location = `/book-appointment/2?date=${date}&tz=${tz}`; | ||||
14 | } |