Forum Discussion

MarcoD_'s avatar
MarcoD_
Qrew Member
2 years ago

Modify the date picker

Hi

I would like to modify the date picker of a date field that it shows e.g. only dates in the future to be selectable, make only Sundays selectable, etc. In an old app that I didn't use a while I used the IOL-technology that was presented by Dan. In a JS-function I could for example set Monday to be the first day with the following line:

$("#_fid_140").datepicker("option", { firstDay: 1});

However this is not possible anymore. What options would I have these days to achieve this?

Thanks in advance for pointing a way.
Marco

------------------------------
Marco Diefenbacher
------------------------------

2 Replies

  • There are two options I can think of. 

    One would be to create a table of dates, with the Key field being he date  between now and say however long you think the app will live say for the next 20 years.  You would probably use Excel to create this one time import.   Then, make a relationship and have the users choose a date off a relationship as opposed to a date picker record. 

    The other options is to just stick to the date picker but put in the validation error formula so that if the user chooses an invalid date it will throw an error and block the save either by a form rule or data table validation rules.

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • MarcoD_'s avatar
      MarcoD_
      Qrew Member
      Thanks for your two tips, Mark. Pity that it is not possible the way it used to be, but I will think about these options. In one case the first idea might match and for the other cases the data table verification could be the better answer as I basically like the data picker way of chosing a date. It is more user friendly in my opinion.

      ------------------------------
      Marco D.
      ------------------------------