In this video, I demonstrate how to create a Date Picker on HTML form using Google Sheets. jQuery Libraries: developers.goo... Video, Code, and Documentation can be found at: codewithcurt.c...
HTML and Javascript Code Used in Video below: $( document ).ready(function() { $("#startdate").datepicker(); $("#enddate").datepicker(); }); function AddRecord() { var name = document.getElementById("name").value; var startdate = document.getElementById("startdate").value; var enddate = document.getElementById("enddate").value; google.script.run.AddRecord(name, startdate, enddate); document.getElementById("name").value = ''; document.getElementById("startdate").value = ''; document.getElementById("enddate").value = ''; } Name: Start Date: End Date: Google Apps Script Code used in Video below: function doGet(e) { return HtmlService.createHtmlOutputFromFile('WebApp'); } function AddRecord(name, startdate, enddate) { var url = ''; //Paste URL of GOOGLE SHEET var ss= SpreadsheetApp.openByUrl(url); var webAppSheet = ss.getSheetByName("Sheet1"); webAppSheet.appendRow([name, startdate, enddate]); }
You make everything so easy! Thanks a lot. I wonder if you could make a webapp where it shows the disabled dates from a row in your spreadsheet to a datepicker in html to show the dates that aren't already available for you to book an appointment to.