From 6eb172d86ae9b12c7a017e1268c1f889205b0b7d Mon Sep 17 00:00:00 2001 From: ruchi Date: Tue, 9 Mar 2021 22:30:55 -0500 Subject: [PATCH] calender validation, form --- css/styles.css | 12 ++++++ index.html | 99 ++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 95 insertions(+), 16 deletions(-) diff --git a/css/styles.css b/css/styles.css index dd21cf7..460d6e0 100644 --- a/css/styles.css +++ b/css/styles.css @@ -248,6 +248,18 @@ p { text-align: left; } +input:invalid+span:after { + position: absolute; + content: '✖'; + padding-left: 5px; + } + + input:valid+span:after { + position: absolute; + content: '✓'; + padding-left: 5px; + } + /* Footer section */ diff --git a/index.html b/index.html index 0803130..c162434 100644 --- a/index.html +++ b/index.html @@ -26,6 +26,13 @@ + + + + + @@ -102,7 +109,7 @@
Batuhan

Hey, I'm the store owner. Ever since I was a child, it was my dream to own a bike shop. I specialize in brake repair.

-

Last updated 3 mins ago

+

Availability: Monday-Friday

@@ -119,10 +126,10 @@
-
Mumem
+
Mumen

Without biking, my life has no meaning. I am the best at fixing punctures in town.

-

Last updated 3 mins ago

+

Availability: Tuesday-Wednesday

@@ -142,7 +149,7 @@
Stewart

I recently got my masters in bike fixing. I can help you with any repair or maintenence

-

Last updated 3 mins ago

+

Availability: Monday-Wednesday

@@ -336,20 +343,26 @@

Mechanics

Please select your technican

- - - - - + + + +

Appointment Time

-

Please select appointment time

+

Please select an appointment time

- - + + +
+ + + +
@@ -358,7 +371,7 @@
@@ -368,9 +381,11 @@
+
+
@@ -378,21 +393,47 @@
+
+
+
+

Account Details

+
+
+
+ + +
+
+ + +
+
+
- +
+
+ + +
+
+ + +
+
+
-
+


@@ -432,7 +473,33 @@ function toAppointment() { document.getElementById('appointment').scrollIntoView(); } + + var value = 0; + + $(function() { + $( "#datepicker").datepicker({ beforeShowDay: getAvailability}); + }); + + function getMechanic(selectObject) { + value = selectObject.value; + } + + function getAvailability(date){ + + if (value == 1 && (date.getDay() === 0 || date.getDay()==6)) /* restrict weekends */ + return [false] + if (value == 2 && (date.getDay() === 0 || date.getDay()==1 || date.getDay()==4 || date.getDay()==5 || date.getDay()==6)) /* restrict M,Thurs, Fri, Sat, Sun */ + return [false] + if (value == 3 && (date.getDay() === 0 || date.getDay()==4 || date.getDay()==5 || date.getDay()==6 )) /* restrict Thurs, Fri, Sat, Sun */ + return [false] + if (date.getDay() === 0 || date.getDay()== 6 ) /* weekends */ + return [false] + else + return [ true, "", "" ] + } + +