Magento – Birthday / Birth in August (08) and September (09) not go

PictureIn our Magento 1.5.1.0 Installation was a customer at, that he could not enter his birthday, because the system told him “Please enter a valid full date” or just according to German.

After a little examination it was found, that only the monthly figures 08 for August and 09 for September did not work. All other months unfolded. The day- or annual statement was not relevant. Only these two months have seen the error message. This issue was at the normal registration or customer. attempting to log on, as well as in the checkout itself when trying to create a user account.

We have solved the problem by the js.js in the folder /js / Varien / as. in Line 438 have changed:

was error = false, day = parseInt(this.day.value) || 0, month = parseInt(this.month.value) || 0, year = parseInt(this.year.value) || 0;

to

was error = false, day = parseInt(this.day.value, 10) || 0, month = parseInt(this.month.value, 10) || 0, year = parseInt(this.year.value, 10) || 0;

After a cache reload and then enter the two months worked fine.

Used in Magento Version 1.5.1.0 Comments? Additions? Notes? Gladly!

Published by Covos

Since 2009 I have been working intensively with Magento. I started with the creation and operation of B2C stores. This was extended through my work in the logistics sector. This resulted first specialized B2E systems. Today I work day-a day with exciting B2C, B2B- and B2E projects and reports in this blog about challenges and give insider tips.

One comment on “Magento – Birthday / Birth in August (08) and September (09) not go”

  1. very nice.. now found by chance! Had same problem ..

    parseInt() goes well when no base is supplied with “08” and “09” one about a octal value, and the number is interpreted as 0 => is “not valid”. It was only after the base is set as a decimal, also agrees with the validation! All right..

Leave a Reply

Your email address will not be published. Required fields are marked *