If you want it to work for IE you will need to use a specific format of date:
stackoverflow.com/questions/3046459/ie-d...ate-with-time-string
Otherwise, it would mean to parse manually the date (really complicated) or use an external JS library like dateJS (easier but still requires work for the library to be integrated into the system).
For the incorrect date, that will require quite some changes. Here is the Display function code which works properly on our end:
function display($field,$value,$map,$inside,$options='',$test=false){
if(empty($field->field_options)) $field->field_options = "%Y-%m-%d";
$format = $field->field_options;
$size = $options . empty($field->field_options) ? '' : ' size="'.$field->field_options.'"';
if(!empty($field->field_options)){
JHTML::_('behavior.mootools');
$processing='';
switch($field->field_options){
case 'future':
$check = 'today>selectedDate';
$message = JText::_('SELECT_DATE_IN_FUTURE',true);
break;
case 'past':
$check = 'today<selectedDate';
$message = JText::_('SELECT_DATE_IN_PAST',true);
break;
}
$js = 'function '.$this->prefix.$field->field_namekey.$this->suffix.'_checkDate(nohide)
{
var selObj = document.getElementById(\''.$this->prefix.$field->field_namekey.$this->suffix.'\');
if(selObj.value==\'\'){
return true;
}
var timestamp=Date.parse(selObj.value);
var today=new Date();
if(isNaN(timestamp)!=false){
selObj.value=\'\';
alert(\''.JText::_('INCORRECT_DATE_FORMAT',true).'\');
return false;
}
var selectedDate = new Date(timestamp);
'.$processing.'
if('.$check.'){
selObj.value=\'\';
alert(\''.$message.'\');
}else{
if(!nohide) this.hide();
}
}';
$document = & JFactory::getDocument();
$document->addScriptDeclaration($js);
$size .= ' onChange="'.$this->prefix.$field->field_namekey.$this->suffix.'_checkDate(1);"';
}
return JHTML::_('calendar', $value, $map,$this->prefix.$field->field_namekey.$this->suffix,$format,$size);
}
You can add a confirmation step. Just configure your checkout workflow in the Checkout tab of the configuration for that.
You can also change the next button for a specific step:
www.hikashop.com/en/support/forum/4-how-...bel-next-button.html