VM 3.0.16
Joomla 2.5.19
PHP 5.4
I have set up a multivariant (we sell courses) with City and Date as Option and it works perfectly
I was wondering if there could be any way to display only futire dates in the dropdowns and hide past courses.
I think it should be possible by modifying the file responsible for generating dropdowns...but where is it located? any hint?
haven't tried in a multivar but in a shopper field datepicker I overide in the template with something like this:
jQuery(document).on( "focus",".datepicker", function() {
if(this.id == 'vm_deliver_date_field_text'){ //add the id of the datepicker
jQuery( this ).datepicker({
firstDay: 1,
changeFirstDay: false,
minDate: +1,
changeMonth: true,
changeYear: true,
dateFormat:"yy-mm-dd",
defaultDate: +1
});
}
});
other variables can be set
you can strikethru old dates with
<style type="text/css">
.ui-state-disabled .ui-state-default, .ui-widget-content .ui-state-disabled .ui-state-default, .ui-widget-header .ui-state-disabled .ui-state-default {
background-image: none;
opacity: 1;
text-decoration: line-through;
}
</style>
thanks I'll try that!