Home › Forums › Feature Requests › Select Year in date picker field
Hi, is there a way to give users the ability to select a year in the standard date picker field? Currently you can only select a day and a month. The year gets filled in automatically and can be changed by editing the textfield. This is cumbersome, especially now when the chances are that you have a bunch of events that are held in 5 weeks, which is next year.
Hi @Florian
I have atached a screenshot of what the current date picker field looks like and I can see that there is a select input for the year.
If all you want is the year, perhaps a simple select field would be more desirable?
Thanks
E
Aha! I am using Safari and the Safari user agent styles seem to push the year-picker out of view. I see it now, in the source.
On line 332 of style.date_picker.css add “display: inline-block” and both selects are shown!
.ui-acf .ui-datepicker select.ui-datepicker-month,
.ui-acf .ui-datepicker select.ui-datepicker-year {
width: 47%;
padding: 1px;
font-size: 12px;
font-weight: normal;
display: inline-block;
}
Hi @Florian
Thanks for the bug report. I’ll do some testing and have this fixed soon.
Is the field showing in a normal metabox? Or is it somewhere a bit different such as in an attachment window, etc?
Thanks
E
Hi @Florian
Just did some testing and can confirm that the date picker is displaying correclty in all browsers including safari.
I suspect that you have some CSS in your theme / plugin which is overriding the default styles and corrupting the UI.
Can you please check all CSS which is being applied to the elements via firebug / inspector?
Thanks
E
The topic ‘Select Year in date picker field’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.