Date Picker: How to set as default date the first of the month?

  • Profile Image
    Asked on May 28, 2020 at 05:28 PM


    I would like to set the custom default date for a Date Picker question to be the first of the current month, but I only see an option to set it to a fixed date.

    How can I set it so that the default date automatically updates to reflect the current month every month?  Ex: next month the default date would change to 2020-5-1.

    Thank you!

  • Profile Image
    Answered on May 28, 2020 at 09:06 PM

    This is not currently possible to do with the current date picker settings or the available widgets, I have been performing some tests and was unable to find a workaround for this, we may however open a feature request for this, although we cannot provide an ETA, we would keep you updated via this ticket, kindly confirm so we can proceed with the request. 

  • Profile Image
    Answered on May 28, 2020 at 09:41 PM

    I found a workaround using the Date Picker and the Substring widgets, here are the steps: 

    - First add the following elements to your form: 

    1. Date Picker widget, you will find it under the widgets tab. 

    2. Substring widget.

    3. A short text entry field. 


    - The date picker widget must be configured like this:


    - The Substring widget must be configured like this:


    On this widget you will also use the field ID, you may refer to this guide for more details about how to get this: 

    This widget will basically get the month and year, that's why the date format is important. 

    - The last step is to copy the value from the Substring widget and insert it to the short text field adding the day, here is how your condition should be configured: 


    The elements should be added as text, by default they are added as numeric values, but you can click on the element to add it as text. 

    This guide will also help you setting up this type of conditions: 

    You can test this on my form: 

    Feel free to change the date in order to see how it's updated.

    I hope this helps. 

  • Profile Image
    Answered on June 03, 2020 at 04:00 PM

    Hi Kevin,

    Thank you for your solution!  However there seems to be an issue with the Substring function on my form.  I tried following your steps, and various other tests, but the substring does not return a value from the Date Picker widget.  I used the ID from the "Field ID" section of the Date Picker.  Also, the number in the calculation (0, 1) will not save as text- if I click them to make them grey and save, the next time I open the calculations they are black again.

    Please advise on how to get Substring to work, thanks!


  • Profile Image
    Answered on June 03, 2020 at 09:28 PM

    Hi, the Substring widget requires using the field ID. You are using the Card Forms layout, and in this layout, the field does not have an ID.

    You can solve this by:

    1) Switching the layout to the Classic one:

    2) Getting the ID of the Date Picker widget:


    3) Put the ID in the Substring widget.

    4) Switch back to Cards layout.



    Let us know if you need more help.

  • Profile Image
    Answered on June 04, 2020 at 04:23 PM

    Thank you for the Field ID explanation.  I would like to hide the Current Date but use substring from it to populate the First Day of the Month, however when I hide Current Date the substrings do not return a value.

    Is there a workaround for this?


  • Profile Image
    Answered on June 04, 2020 at 07:01 PM

    Hi, I am afraid that there is no other workaround in the Card layout, the widget needs to show up, so the value can be passed to the substring widget.

    If you try the Classic layout, the widget can be hidden with CSS code:


        visibility: hidden;


    So, the value will still pass. Unfortunately, the Card layout does not allow CSS code injection.