It use dob.phtml widget.
Find customer/widget/dob.phtml and add it to your template from Base
Just add the following JS to the <script> tags
Varien.DOB.prototype.initialize = Varien.DOB.prototype.initialize.wrap(
function(original, selector, required, format) {
var el = $$(selector)[0];
var container = {};
container.day = Element.select(el, '.dob-day input')[0];
container.month = Element.select(el, '.dob-month input')[0];
container.year = Element.select(el, '.dob-year input')[0];
container.full = Element.select(el, '.dob-full input')[0];
container.advice = Element.select(el, '.validation-advice')[0];
//we need this to make the object avaliable and enable wrapping of validation method
this.dateElement = new Varien.DateElement('container', container, required, format);
}
);
Varien.DateElement.prototype.validate = Varien.DateElement.prototype.validate.wrap(
function(original){
if(original()){
var today = new Date();
if (today >= new Date(this.fullDate.getFullYear() + 18, this.fullDate.getMonth(), this.fullDate.getDate())) {
return true;
} else {
this.advice.innerHTML = this.errorTextModifier(Translator.translate('You have to be at least 18 years old.'));
this.advice.show();
return false;
}
}
}
);