Jump to content
lenoir

Datepicker Year Range not Displaying the Past Years

Recommended Posts

Hi,

I've setup a date field with a date picker. I set it with a range of "-10:+10" for the years, but for some obscure reason (to me), instead of showing years from 2009 to 2029, it shows the coming 20 years (2019 - 2039). 

Am I missing a preference somewhere?

Share this post


Link to post
Share on other sites

It behaves correctly if I leave the field "range" empty… But as soon as I enter some value such as "-30:+20" (as in the example), it starts counting at the current year… 

Share this post


Link to post
Share on other sites
26 minutes ago, lenoir said:

But as soon as I enter some value such as "-30:+20" (as in the example), it starts counting at the current year…

It's working as expected for me. You're not including the quote marks around the value by any chance are you?

33 minutes ago, lenoir said:

I set it with a range of "-10:+10" for the years

If -10:+10 is actually the value you want you can leave the setting empty because that is the default.

  • Thanks 1

Share this post


Link to post
Share on other sites
52 minutes ago, Robin S said:

It's working as expected for me. You're not including the quote marks around the value by any chance are you?

If -10:+10 is actually the value you want you can leave the setting empty because that is the default.

Actually… I was. Doh. Can't believe I oversaw that. 🤯

Thanks a lot 

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By VeiJari
      Hello forum! 
      Our customer wants to choose only 15 minute intervals in the inputfield Datetime. So the dropdown values would be: 0, 15, 30 and 45.
      Is there an easy way to achieve this?
      Any help is appreciated 🙂
    • By gebeer
      Hello,
      I have a frontend contact form with datepicker and need to have the german localization for it.
      I read about localization of datepicker on the jQuery Ui API page.
      How can I implement this in PW? I'm using FormBuilder module
      My form is loading these assets:
      InputfieldDatetime.js
      JqueryCore.js
      JqueryUI.js
      I rolled a custom UI theme and amended the js to have German language for datepicker.
      Now when I load that js file on top of the above mentioned, nothing changes. So I guess, the standard PW datepicker options do net get overridden by my custom theme js.
      In this thread apeisa says 
      How would I go about it?
      Thank you
      gerhard
      PS: and sorry for doubleposting. I thought I explain my situation a bit more in this new thread.
    • By tuke
      I'm trying to build a date input field with following functionality:
      - Date can be manually typed using format dd.mm.yyyy
      - Date can be selected using datepicker (which should output the date in dd.mm.yyyy format)
      The problem is that the date field only accepts dashes (-) as a separator so the date must be entered using format mm-dd-yyyy. Also, when a date is selected using datepicked, it is outputted in mm-dd-yyyy format.
      How can I change the format to dd.mm.yyyy? I tried to change the format settings but it had no effect.
      My settings:


      I'm using Processwire 2.3.0.
      EDIT: The datepicker works correctly in admin section but not in my front-end custom page.
×
×
  • Create New...