Enter Date as month and year only

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I would like to be able to not choose a day on a particular date field. I am able to display a date as month/year easily enough but the issue comes in when someone just wants to type in a month and year. 

Use Case:
Entering a expiration date for credit cards. Enter 01/16 (January 2016) and not have to choose a day. 

I am leaning towards the idea that this should not be a date field at all but a text field with a validation rule. I have tried removing the day from the calendar with no success. Thanks for any insight!
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
So - the separate month  / year fields are going to be the easiest way to get this. 

But with enough javascript wizardry - it looks feasible to override the Jquery UI datepicker and have it present in different modes. 

https://community.skuidify.com/skuid/topics/override_the_standard_date_picker?topic-reply-list%5Bset...

http://stackoverflow.com/questions/2208480/jquery-ui-datepicker-to-show-month-year-only

I've not got the stamina to translate that to the skuid page tonight... 
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb
Thanks Rob! I investigated both of those links before but they do not fill the need. Neither one allow just the month and year selection.

The second link is referred to in this thread but there doesn't seem to be a way to hide the day picker of the calendar. 

It seems like the best solution (at least for my scenario) is a text field with a validation rule.