ziycon

  • Posts: 126
jQuery Datepicker
« on April 25th, 2013, 10:40 PM »
This is just a nice to have, not sure if there is a generic datepicker already available in the code but it would be nice to have a generic/global datepicker that could be used for any date filed for example on th forum profile page where you select your date of birth or in any admin pages and also to make the datepicker available to any mods/plugins developed in the future. :D
APRAI - Custom Theme - SMF 2.0.5


Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: jQuery Datepicker
« Reply #1, on April 25th, 2013, 10:49 PM »
It's already in there.

jQuery UI is already implemented for the occasions it is needed and includes that.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

ziycon

  • Posts: 126
Re: jQuery Datepicker
« Reply #2, on April 25th, 2013, 10:51 PM »
Nice, will it be added to the 'Birthdate' field in forum profile(?area=forumprofile)?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278

ziycon

  • Posts: 126

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: jQuery Datepicker
« Reply #5, on April 25th, 2013, 11:08 PM »
Now I have a few more moments, there's a reason why the answer is no, and it's not what you think.

You can (quite legitimately) insert a date without a year into the birthday option. And both SMF and Wedge will quite happily accept it, so you can put in your birthday without having to give away your full age, perhaps so you can join in the birthday celebrations and appear on the calendar but keep your age private.

(Internally, they are converted to y-m-d with a year of 4, so leap year processing works too)

ziycon

  • Posts: 126
Re: jQuery Datepicker
« Reply #6, on April 25th, 2013, 11:13 PM »
I understand your thinking behind, makes sense in hindsight, thanks for the explanation.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: jQuery Datepicker
« Reply #7, on August 1st, 2013, 07:53 AM »
I've had time to mull this over. What would be neat is if we were to offer an option for 'no year' and 'with year' and offer a nice UI for both, perhaps with date pickers where appropriate.

Hristo

  • Posts: 19
Re: jQuery Datepicker
« Reply #8, on August 1st, 2013, 09:28 AM »
BTW, as SMF Wedge does not accept year only and I find that some users (including me) prefer to show only the year of birth, but not the exact date. That is mostly for privacy reasons. Of course it's easy to achieve with custom fields, but still why duplicate something in-build.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: jQuery Datepicker
« Reply #9, on August 1st, 2013, 05:46 PM »
There are technical reasons why that isn't properly supported. I'm not entirely sure we can actually fix that either.