0
Ich habe versucht, viele Anleitungen zu verwenden, um den pickupdate DatePicker um 1 Tag vom Dropoff Date DatePicker zu erhöhen, aber ich kann ' t es zur Arbeit bringen. Ich bin mir nicht sicher, wie man die beiden Elemente in den Tags <script>
zusammenarbeitet.Code für DatePicker - Zweites Datum muss größer sein als das erste Datum nach 1 Tag
Was ich habe, ist:
{{ '//code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css' | stylesheet_tag }}
{{ '//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js' | script_tag }}
<div style="width:300px; clear:both;">
<p>
<label for="dropoffdate">Specify a drop off date:</label>
<input id="dropoffdate" type="text" name="attributes[dropoffdate]" value="{{ product.attributes.dropoffdate }}" />
</p>
<p>
<label for="pickupdate">Specify a pick up date:</label>
<input id="pickupdate" type="text" name="attributes[pickupdate]" value="{{ product.attributes.pickupdate }}" />
</p>
</div>
<script>
jQuery(function() {
jQuery("#dropoffdate").datepicker({
minDate: +1,
maxDate: '+2M',
dateFormat: "dd/mm/yy"
});
});
jQuery(function() {
jQuery("#pickupdate").datepicker({
minDate: +1,
maxDate: '+2M',
dateFormat: "dd/mm/yy"
});
});
</script>
mir jemand helfen?