Estimated Delivery Component
Installation:
Installation: npm install react-estimated-deliveryUsage:
$import { EstimatedDeliveryComponent } from "react-estimated-delivery";Configuration:
The estimated delivery component can accept any element for the icon.
<EstimatedDeliveryComponent> </EstimatedDeliveryComponent>Business days object
businessDays={{ "monday": true, "tuesday": true, "wednesday": true, "thursday": true, "friday": true, "saturday": false, "sunday": false }}Delivery days object
deliveryDays={{ "monday": true, "tuesday": true, "wednesday": true, "thursday": false, "friday": true, "saturday": true, "sunday": false }}Cut off time for next day delivery.
cutOffTime={"12:00"}Pass in an array of holidays, dd/mm/yyyy, this is to be used for bank holidays.
holidays={["07/08/2024", "08/08/2024"]}Set the timezone to diplay to the customer.
timezone={"Europe/London"}Used when passing in holidays, the format should match the format of your holidays (dd/mm/yy or mm/dd/yyy).
dateFormat={"en-GB"}Have the countdown show if next day delivery is available.
enableCountDownTimer={true}Text for next day delivery available.
nextDayDeliveryAvailableText={"Next day delivery available."}Text for next day delivery not available.
nextDayDeliveryNotAvailableText={"Next day delivery NOT available."}Text for estimated delivery.
estimatedDeliveryText={"Estimated delivery date:"Text for timer.
timerText={{hours: "h", minutes: "m", seconds: "s"}}Order within text.
orderWithinText={"Order within"}Enable next day delivery.
isNextDayAvailable={true}Set how many days to increment by.
deliveryDayIncrement={1}Show date range.
showDateRange={true}Number of days to add to earliest delivery date for a date range.
dateRange={2}Text to display during estimate load.
loadingText={"Getting estimate..."}