OC v2.3.0.2
Hello.
I need to change the default behaviour of the datepicker to allow multi-date selection and to disable Saturday and Sunday dates.
I am not very javascript/jquery savvy, so I am hoping for a nice, easy-to-follow tutorial to achieve my requirements.
Thanks to all for this great resource.
Using the current bootstrap 3 datepicker, there is no way of allowing multiple dates to be picked, unless you add multiple date picker fields.
To disable Saturday and Sunday from being picked, you can add an option to the javascript in the catalog/view/theme/default/template/product/product.tpl file
find
change to
To disable Saturday and Sunday from being picked, you can add an option to the javascript in the catalog/view/theme/default/template/product/product.tpl file
find
Code: Select all
$('.date').datetimepicker({
pickTime: false
});
Code: Select all
$('.date').datetimepicker({
pickTime: false,
daysOfWeekDisabled: [0, 6]
});
Thanks for the reply. The multi-date field option won't work for me as I don't want to restrict the customer to a fixed number of days (in your example 3). The customer will be selecting multiple days per week (4 to 5 weeks) and in some instances the entire week (their selected multiple days in combination with extra special days) of a date range spanning 30 days. Thanks about the heads up on the bootstrap 3 version of the datepicker.
No problem. You will most likely want a replacement datepicker in that case that can handle multiple selection.
I can see you have requested a commercial solution, so I am sure you will be sorted soon.
I can see you have requested a commercial solution, so I am sure you will be sorted soon.
Who is online
Users browsing this forum: No registered users and 65 guests