Using Html service, get date input - calendar pop up

后端 未结 1 1127
臣服心动
臣服心动 2021-01-16 22:29

I\'m trying to get a basic html page working with the google html service. As of now I have:

Welcome to some random page

<
1条回答
  •  天命终不由人
    2021-01-16 22:52

    you can't mix UiApp and HTML service, try the JQuery datepicker as shown in the example below :

    read also the doc here

    code.gs

    function doGet() {
      return HtmlService.createHtmlOutputFromFile('html.html').setSandboxMode(HtmlService.SandboxMode.NATIVE);
    }
    

    html.html

    Choose date :

    online example : here

    And about your comment on using SpreadsheetApp, see doc here


    edit : following comments about speed, here is a version that link to the Google hosted library to be faster. Added some style too (online example updated)

    Welcome to some random page

    Please select a date below :

    click here :

    You can also choose a different style... try to replace "smoothness" with "redmond" or "south-street", doc is on the JQuery site

    0 讨论(0)
提交回复
热议问题