Jump to content

Weirdness with date field using separate fields (2 march's showing)


Recommended Posts

I've narrowed it down to line 93 of InputfieldDatetimeSelect.php

strftime($monthFormat, mktime(0, 0, 0, $n))

All ints from 1 - 12 output the relevant month abbreviation except for 2 which outputs March.

No idea why though currently.

Link to comment
Share on other sites

Ok got it. There needs to be a 5th parameter passed of 1 so that the day selected is the first of the month otherwise it's getting a day that doesn't exist and skips over onto the next month.

strftime($monthFormat, mktime(0, 0, 0, $n, 1))


  • Like 4
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

  • Recently Browsing   0 members

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