Jump to content

InputfieldDatetime Minimum and Maximum


BrendonKoz
 Share

Recommended Posts

I had set an InputfieldDatetime field's setting of "yearRange" to "0:+2" and apparently 0, for the number of years before the current year simply is defined as no limit. (This should work for similar datetime field settings that offer a range.)

image.thumb.png.59a12f3d1dd21bda8f8dd6a4ec1d0bbd.png

image.thumb.png.344f8fc80b193a04e2580a3ac6da2f9e.png

The formatting expectation for the jQuery-UI datetime picker component is a string value that always has a negative value, a colon separator, and a positive value, indicated by "-x:+y".

The solution here is simple, but in case anyone else runs into this problem, it just takes the following form instead:

yearRange="-0:+2"

Simply include the negative sign in front of the zero! 🤦‍♂️

image.png.cab07ad354c30adb003de0ede6798694.png

  • Like 6
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...