Including a delivery date field at checkout
If you want to allow your customers to tell you their preferred delivery date at checkout (as shown in the example below) then you can include a 'delivery date' field on the shopping basket page of your website's checkout.
The name of the field is delivery_date, e.g.
<input type="text" name="delivery_date">
To make this field display only when certain delivery rates are selected, you will need to code the Javascript on your theme accordingly.
To display a popup calendar date-picker you'll need to integrate a third party tool into your theme's files.
The form field must be present within the <form> tag on the checkout_basket.twig page that submits the checkout form to the next step.
Once an order is received
A customer's selected delivery date can be viewed on the management system when viewing an order, as shown in the example below.
On the order PDF and order confirmation email, the chosen date can be outputted using the variable {{ order.delivery_date }}.
Other applications
Even though the field name is delivery date, the field does not have to be used for this purpose. It can be used for any purpose where you need to request information from the user on the shopping basket page (as opposed to the checkout page which has a different field, already available, for order comments).