Сake (13 Февраль 2014 - 02:52) писал:
я убрал из кода, т.к. ни чего не меняется, как я написал выше. Сейчас вставлю - не буду убирать и буду благодарен за помощь...
Отправлено 13 Февраль 2014 - 20:17
Сake (13 Февраль 2014 - 02:52) писал:
Отправлено 14 Февраль 2014 - 03:26
$('[name="form[delivery][convenient_time_from]"]').change(function() { var min = parseInt($(this).val()); if(!min) return; $('[name="form[delivery][convenient_time_to]"] option').each(function() { $(this).attr('disabled', 'disabled').removeAttr('selected').hide(); if(parseInt($(this).val()) >= 19 && parseInt($(this).val()) <= 21) { $(this).removeAttr('disabled').show(); } }); }); }); });
$('[name="form[delivery][convenient_time_from]"]').change(function() { var min = parseInt($(this).val()); if(!min) return; $('[name="form[delivery][convenient_time_to]"] option').each(function() { $(this).attr('disabled', 'disabled').removeAttr('selected').hide(); if(parseInt($(this).val()) >= 19 && parseInt($(this).val()) <= 21) { $(this).removeAttr('disabled').show(); } }); }); });
Отправлено 15 Февраль 2014 - 18:53
Отправлено 18 Февраль 2014 - 01:25
if(parseInt($(this).val()) >= 18)
if(parseInt($(this).val()) >= 19 && parseInt($(this).val()) <= 21)
if(parseInt($(this).val()) >= 18)
if(parseInt($(this).val()) >= 18 && parseInt($(this).val()) <= 19)
if(parseInt($(this).val()) == 18)
Отправлено 20 Февраль 2014 - 22:07
Отправлено 10 Апрель 2014 - 00:20
zwerikz (20 Февраль 2014 - 22:07) писал:
Отправлено 10 Апрель 2014 - 01:20
if(parseInt($(this).val()) >= 19 && parseInt($(this).val()) <= 21)
if(parseInt($(this).val()) > parseInt($('[name="form[delivery][convenient_time_from]"]').val()))
Отправлено 10 Апрель 2014 - 15:58
Сake (10 Апрель 2014 - 01:20) писал:
if(parseInt($(this).val()) >= 19 && parseInt($(this).val()) <= 21)
if(parseInt($(this).val()) > parseInt($('[name="form[delivery][convenient_time_from]"]').val()))
Отправлено 11 Апрель 2014 - 02:42
$('[name="form[delivery][convenient_time_from]"]').change(function() { var min = parseInt($(this).val()); if(!min) return; $('[name="form[delivery][convenient_time_to]"] option').each(function() { $(this).attr('disabled', 'disabled').removeAttr('selected').hide(); if(parseInt($(this).val()) > parseInt($('[name="form[delivery][convenient_time_from]"]').val())){ $(this).removeAttr('disabled').show(); } }); }); });
$('[name="form[delivery][convenient_time_from]"]').change(function() { var min = parseInt($(this).val()); if(!min) return; $('[name="form[delivery][convenient_time_to]"] option').each(function() { $(this).attr('disabled', 'disabled').removeAttr('selected').hide(); if(parseInt($(this).val()) > min){ $(this).removeAttr('disabled').show(); } }); });
<input id="deliveryConvenientDate"
<input autocomplete="off" id="deliveryConvenientDate"
Отправлено 11 Апрель 2014 - 10:16
Сake (11 Апрель 2014 - 02:42) писал:
$('[name="form[delivery][convenient_time_from]"]').change(function() { var min = parseInt($(this).val()); if(!min) return; $('[name="form[delivery][convenient_time_to]"] option').each(function() { $(this).attr('disabled', 'disabled').removeAttr('selected').hide(); if(parseInt($(this).val()) > parseInt($('[name="form[delivery][convenient_time_from]"]').val())){ $(this).removeAttr('disabled').show(); } }); }); });
$('[name="form[delivery][convenient_time_from]"]').change(function() { var min = parseInt($(this).val()); if(!min) return; $('[name="form[delivery][convenient_time_to]"] option').each(function() { $(this).attr('disabled', 'disabled').removeAttr('selected').hide(); if(parseInt($(this).val()) > min){ $(this).removeAttr('disabled').show(); } }); });
<input id="deliveryConvenientDate"
<input autocomplete="off" id="deliveryConvenientDate"
Отправлено 12 Апрель 2014 - 01:58
<input type="text" id="deliveryConvenientDate" name="form[delivery][convenient_date]" value="{ORDER_FORM_DELIVERY_CONVENIENT_DATE}" class="input-text {% IF SETTINGS_ORDER_FIELDS_CONVENIENT_TIME=1 %}required{% ENDIF %}" maxlength="10" minlength="10" />
<input type="text" autocomplete="off" id="deliveryConvenientDate" name="form[delivery][convenient_date]" value="{ORDER_FORM_DELIVERY_CONVENIENT_DATE}" class="input-text {% IF SETTINGS_ORDER_FIELDS_CONVENIENT_TIME=1 %}required{% ENDIF %}" maxlength="10" minlength="10" />
Отправлено 09 Август 2014 - 13:41
Отправлено 12 Август 2014 - 03:12
firstDay : 1
firstDay : 1, beforeShowDay : function(date) {return([date.getDay() != 0, ''])}
$(function () { $('[name="form[delivery][convenient_date]"]').attr('readonly', true); $('[name="form[delivery][convenient_time_from]"]').change(function () { var timeFrom = $(this).val(); var timeInterval = 2; $('[name="form[delivery][convenient_time_to]"] option').each(function () { $(this).removeAttr('disabled'); if (parseInt($(this).val()) < (parseInt(timeFrom) + timeInterval)) { $(this).attr('disabled', true); } }).filter(':first').attr('selected', true); }); });
Отправлено 27 Август 2014 - 05:10
Сake (12 Август 2014 - 03:12) писал:
firstDay : 1
firstDay : 1, beforeShowDay : function(date) {return([date.getDay() != 0, ''])}
$(function () { $('[name="form[delivery][convenient_date]"]').attr('readonly', true); $('[name="form[delivery][convenient_time_from]"]').change(function () { var timeFrom = $(this).val(); var timeInterval = 2; $('[name="form[delivery][convenient_time_to]"] option').each(function () { $(this).removeAttr('disabled'); if (parseInt($(this).val()) < (parseInt(timeFrom) + timeInterval)) { $(this).attr('disabled', true); } }).filter(':first').attr('selected', true); }); });
Цитата
Отправлено 27 Август 2014 - 23:51
// Смена стоимости доставки при выборе конкретной зоны доставки $('.orderInfo select').change(function(){
// Смена стоимости доставки при выборе конкретной зоны доставки $('.orderInfo .deliveryZoneRadio').change(function(){
Отправлено 01 Сентябрь 2014 - 11:53
<!-- Если запрашивается поле удобного времени доставки --> {% IF SETTINGS_ORDER_FIELDS_CONVENIENT_TIME<3 %} <tr> <td width="10%"> <label for="deliveryConvenientDate">Удобное время доставки:{% IF SETTINGS_ORDER_FIELDS_CONVENIENT_TIME=1 %}<span class="red">*</span>{% ENDIF %}</label> </td> <td width="90%"> <input id="deliveryConvenientDate" name="form[delivery][convenient_date]" value="{ORDER_FORM_DELIVERY_CONVENIENT_DATE}" {% IF SETTINGS_ORDER_FIELDS_CONVENIENT_TIME=1 %}class="required"{% ENDIF %} /> c <select name="form[delivery][convenient_time_from]"> <option></option> {% FOR convenient_time_from_list %} {% IF convenient_time_from_list.HOUR_INT=10 %}<option value="{convenient_time_from_list.HOUR_INT}" {% IF convenient_time_from_list.SELECTED %}selected="selected"{% ENDIF %}>{convenient_time_from_list.HOUR}</option>{% ENDIF %} {% IF convenient_time_from_list.HOUR_INT=15 %}<option value="{convenient_time_from_list.HOUR_INT}" {% IF convenient_time_from_list.SELECTED %}selected="selected"{% ENDIF %}>{convenient_time_from_list.HOUR}</option>{% ENDIF %} {% ENDFOR %} </select> до <select name="form[delivery][convenient_time_to]"> <option></option> {% FOR convenient_time_to_list %} {%IF convenient_time_to_list.HOUR_INT=16%}<option value="{convenient_time_to_list.HOUR_INT}" {% IF convenient_time_to_list.SELECTED %}selected="selected"{% ENDIF %}>{convenient_time_to_list.HOUR}</option>{%ENDIF%} {%IF convenient_time_to_list.HOUR_INT=21%}<option value="{convenient_time_to_list.HOUR_INT}" {% IF convenient_time_to_list.SELECTED %}selected="selected"{% ENDIF %}>{convenient_time_to_list.HOUR}</option>{%ENDIF%} {% ENDFOR %} </select> </td> </tr> {% ENDIF %}
$("#deliveryConvenientDate").datepicker({ dayNames : ['Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота', 'Воскресенье'], dayNamesMin : ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб' ], closeText : 'Готово', currentText : 'Сегодня' , duration : '', monthNames : ['Январь','Февраль','Март','Апрель','Май','Июнь','Июль','Август','Сентябрь','Окрябрь','Ноябрь','Декабрь'], monthNamesShort : ['Янв','Фев','Март','Апр','Май','Июнь','Июль','Авг','Сен','Окт','Ноя','Дек'], yearRange : "-6:+6", dateFormat : 'dd.mm.yy', minDate : new Date(), firstDay : 1, beforeShowDay: function(date) { var day = date.getDay(); return [(day != 6 && day != 0)]; } });
Отправлено 03 Сентябрь 2014 - 00:42
<option></option>
$(function () { $('[name="form[delivery][convenient_date]"]') .attr('readonly', true); $('[name="form[delivery][convenient_time_from]"]') .change(function () { var timeFrom = $(this) .val(); var timeInterval = 2; $('[name="form[delivery][convenient_time_to]"] option') .each(function () { $(this) .removeAttr('disabled'); if (parseInt($(this) .val()) < (parseInt(timeFrom) + timeInterval)) { $(this) .attr('disabled', true); } }) .filter(':first') .attr('selected', true); }) .find('option[value!]:first') .attr('selected', true) .trigger('change'); $('[name="form[delivery][convenient_time_to]"]') .change(function () { var deliverDate = $("#deliveryConvenientDate"); var date = new Date(); if ($(this).val() < 16) { date.setDate(date.getDate() + 1); deliverDate.datepicker("option", "minDate", date); } else { date.setDate(date.getDate() + 2); deliverDate.datepicker("option", "minDate", date); } }); });
var timeInterval = 2;
Отправлено 04 Сентябрь 2014 - 15:36
Цитата
$(function () { $('[name="form[delivery][convenient_date]"]') .attr('readonly', true); $('[name="form[delivery][convenient_time_from]"]') .change(function () { var timeFrom = $(this) .val(); var timeInterval = 2; $('[name="form[delivery][convenient_time_to]"] option') .each(function () { $(this) .removeAttr('disabled'); if (parseInt($(this) .val()) < (parseInt(timeFrom) + timeInterval)) { $(this) .attr('disabled', true); } }) .filter(':first') .attr('selected', true); }) .find('option[value!]:first') .attr('selected', true) .trigger('change'); $('[name="form[delivery][convenient_time_to]"]') .change(function () { var deliverDate = $("#deliveryConvenientDate"); var date = new Date(); if ($(this).val() < 16) { date.setDate(date.getDate() + 1); deliverDate.datepicker("option", "minDate", date); } else { date.setDate(date.getDate() + 2); deliverDate.datepicker("option", "minDate", date); } }); });
Цитата
Цитата
Отправлено 05 Сентябрь 2014 - 02:00
$(function () { $('[name="form[delivery][convenient_date]"]') .attr('readonly', true); $('[name="form[delivery][convenient_time_from]"]') .change(function () { var timeFrom = $(this) .val(); var timeInterval = 2; $('[name="form[delivery][convenient_time_to]"] option') .each(function () { $(this) .removeAttr('disabled'); if (parseInt($(this) .val()) < (parseInt(timeFrom) + timeInterval)) { $(this) .attr('disabled', true); } }) .filter(':first') .attr('selected', true); }) .find('option[value!]:first') .attr('selected', true) .trigger('change'); $('[name="form[delivery][convenient_time_to]"]') .change(function () { var deliverDate = $("#deliveryConvenientDate"); var date = new Date(); if ($(this).val() < 16) { date.setDate(date.getDate() + 1); deliverDate.datepicker("option", "minDate", date); } else { date.setDate(date.getDate() + 2); deliverDate.datepicker("option", "minDate", date); } }); });
Отправлено 08 Сентябрь 2014 - 12:03
0 пользователей, 0 гостей, 0 анонимных