Home » How to add a date picker to a Google Spreadsheet

How to add a date picker to a Google Spreadsheet

Here’s how to add a date picker to a Google Spreadsheet…

Select the cell (or the row, or column) and set the “format” to “date”.

Adding a date picker

Double-click the date and there’s your date picker!

Did it work for you?





Share this:

18 comments

  1. Kevin says:

    This didn’t work for me. I had to select a range of cells, then choose data validation. Select Date from the drop-down showing “List from a Range” then hit save. Formatting the date works as described.

  2. Sage says:

    I created a script that lets you choose a date from a dropdown, and then auto changes the format to include time. Pasted below:

    NOTE: To paste the code click “Tools” –> “Script editor” –> paste code in. … NOTE – you will have to change the text “tblInput” in the script to whatever your tab is named that you want the script to work on.

    function formatColCD_ToDateTime() {
    // First select columns of interest (C&D in this script) and choose
    // Data → Data Validation → Criteria = Date, is valid date.
    // This script then: sets the format to be date and time for the range C:D
    // after a date is picked in those columns.
    var ss = SpreadsheetApp.getActiveSpreadsheet();

    var sheet = ss.getSheetByName(‘tblInput’);
    var c = ss.getActiveCell();
    if( c.getColumn() == 3 || c.getColumn() == 4)
    {
    sheet.getRange(‘C:D’).activate();
    sheet.getActiveRangeList().setNumberFormat(‘M/d/yyyy H:mm:ss’);
    }
    }

    • DEREK B CRAGER says:

      Getting Illegal character. (line 8, file “Code”) when I attempt to save your cut and pasted code. Before and after editing my tab name to match what I have.

      • Mike Benny says:

        Try copy and paste into Notepad first (or any html editor), Notepad should remove any formatting that could be causing issues.

      • Joel says:

        The illegal character is the apostrophe. Delete it in the Script Editor and retype it. You will need to do that for all the apostrophes in the script.
        Cheers!

  3. Hamid Kharal says:

    Hi Mike, can you make the date picker just select months instead of picking days?

    I want to be able to click a cell and just select a month that I want.

    Thanks

    • Mike Benny says:

      It is possible to only display the month (with no day), but the date picker will still show a regular calendar (with days).

      Select the cell, then pulled-down the “more formats” (123) drop-down. Select “More Formats”, “More date and time formats”. From there you can remove the “day” and just keep “month”.

      Steps

  4. Morten Meyer says:

    Hi. This works wonderfully when using the spreadsheet on my PC. I also need to be able to enter dates from an android smartphone using chrome and from an Iphone/Ipad using the sheets app or a browser. But no datepicker shows up when I click on a cell to enter a date. Do you know how to open the datepicker on ios and android? It is probably jest a user error on my side – please help if you can. Thanks a million.

    • Mike Benny says:

      Hi Morten,

      Try selecting the cell and then look for a little calendar icon.

      Date picker Android

      This is from my Android, but I’m sure iOS would have something similar.

      Please let us know if this works.

      • Derek Jones says:

        I’m not getting the calendar icon on ios. Not critical for me, but would be nice and wouldn’t have to fire up the laptop.

    • Mike Benny says:

      To change the format of the date, select the date cells (or column) and click Format (from the main menu). From the drop-down select Number and select from the date formats shown.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.