Thursday, 9 June 2011

Date of Birth (DOB) Issue on registration form for Magento version 1.5.0.1

There was some error in Magento version 1.5.0.1 -

parseInt accepts a prefix to specify the radius, validation is now crippled.

I changed line 437 in /js/varien/js.js

From:


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

Replace:

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

1 comment:

  1. Thanks for this! I was having this problem with just the month field. Very weird bug.

    ReplyDelete