I'm trying to get a basic html page working with the google html service. As of now I have:
<div>
<h1>Welcome to some random page</h1>
<p>Please select a date below:</p>
<input type="date" name="classDate" onselect="google.script.run.dateSelect()">
</div>
In a regular html file I get to pick a date from a little calendar view, but in this google web app I can't seem to do that. I see the 'UI service' from google has a datepicker ( https://developers.google.com/apps-script/reference/ui/date-picker ) but I dont understand how to get it into my webapp. How do I get the little calendar pop up in this google web app? - UI date picker or not.
I've added the date picker to my code.gs file but it still doesnt come up.
function doGet(request) {
return HtmlService.createHtmlOutputFromFile('index');
}
function dateSelect() {
var app = UiApp.createApplication();
var handler = app.createServerHandler("change");
var date = app.createDatePicker().setPixelSize(150, 150).addValueChangeHandler(handler).setId("date");
app.add(date);
return app;
}