I have a dropdown with dates on a webshop, pushed from an external service:
<select id="leverdatum" class="" name="attribute_leverdatum" data-attribute_name="attribute_leverdatum" data-show_option_none="yes">
<option value="">Een optie kiezen</option>
<option value="ma 23.03.2020" >ma 23.03.2020</option>
<option value="wo 25.03.2020" >wo 25.03.2020</option>
<option value="vr 27.03.2020" >vr 27.03.2020</option>
<option value="ma 30.03.2020" >ma 30.03.2020</option>
</select>
When a customer orders a product, I want to check if the nearest date in the future min. 48h reservation/delivery from the pulldown.
Example:
- Order product on 23/03/2020, next delivery is on 25/03/2020
- Order product on 24/03/2020, next delivery is on 27/03/2020
I know this is possible with an Input field and the jQuery DatePicker, but this is not an option, because the pulldown is pushed from an external service, and on this service is not a possibility integrated to do the control/check date.
So I search for an frontend solution with Javascript or jQuery. Can somebody help me with this, or has experience with similar problem?