You are viewing limited content. For full access, please sign in.

Question

Question

Forms date field not accepting negative years in the future limitation

asked on August 30, 2021

I am getting an error that a negative number is not a valid number for the date restriction. Wouldn't a negative number be a valid specification? How else would I set the date range to be only in the past?

 

Customer is trying to accomplish the following

Is there a way to set a rule on the birthdate calculator that if the year used is equal to or less 14 years (2007) that an error is given? Multiple employees input the right date and month but it defaults to the current year

0 0

Answer

Replies

replied on August 30, 2021

This is not supported but can be achieved with some custom JS. It's a good feature request to be able to set up date ranges to be in the past (or in the future for other cases). 

0 0
replied on August 30, 2021

Ok, I guess JS could be used to alert them or complain if the date is not within a range, was there a JS method that makes the field invalid as well so that if they click submit it highlights it in Red and anchors them on the field?

0 0
replied on August 30, 2021

Oh setting the min and max attributes does this automatically, ok that works, thanks!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.