Uni CPO 4 Documentation
  • Introduction
  • Why Uni CPO?
  • Installation
    • Upgrade
  • How To Use
    • Plugin's Settings
    • Builder
      • Data Structure
      • General Settings
      • Non Option Variable (NOV)
      • Weight Conditional Logic
      • Dimensions Settings
      • Image Conditional Logic
      • Formula Conditional Logic
      • Dynamic labels for options/suboptions
      • Shipping Classes Conditional Logic
      • Cart Discounts
    • Basic Modules
      • Row
      • Column
      • Paragraph
      • Button
      • Image
    • Options
      • Text Input
      • Text Area
      • Select
      • Radio Inputs
      • Checkbox Inputs
      • Date Picker
      • File Upload
      • Dynamic Notice
      • Range Slider
      • Matrix
      • Extra Cart Button
      • Google Map
      • Distance by Postcode
      • Font Preview
    • Fields Conditional Logic
    • Validation Conditional Logic
    • Colorify Feature
    • Imagify Feature
    • "Free Sample" Feature
    • Arithmetic Operators
    • Manage Order Items
    • Suboptions export/import
  • For developers
    • Actions & Filters
    • JS events
    • Extending Uni CPO
  • Duplicating options and products
  • How to debug
  • Affiliation
  • Themes & Plugins Compatibility
    • Popup Maker How To
    • Boxtal
    • Pitchprint.com
    • NBDesigner
    • Toggle Tax For Woocommerce
  • FAQ
  • Refund Policy
  • Managing licenses and billing info
    • License Utilization
  • Uni CPO Add-ons
    • Custom dynamic SKU (paid)
      • Stock management based on dynamic SKU
    • "Send Inquiry" (free)
    • Hidden/disabled option (free)
Powered by GitBook
On this page

Was this helpful?

  1. How To Use
  2. Options

Date Picker

PreviousCheckbox InputsNextFile Upload

Last updated 5 years ago

Was this helpful?

Adds a possibility to use Date Picker as a form field for your form. It can be of two types: single date and dates range. For instance, this is how it looks like in dates range mode:

🏆 PRO FUNCTIONALITY: In addition to the main variable that holds a formatted date (or starting and ending dates splited by dash sign), this Option also has these special vars:

{option_slug_start}
{option_slug_end}
{option_slug_duration}

The first two variables hold formatted dates. Start is for starting date and end is for ending date (it is empty when the Option is in single date mode). Duration variable holds the number of days between starting and ending dates chosen.

Some tips and tricks:

1) In order to set default range for datepicker in range mode use value like "2019-04-05 - 2019-04-09" in "Default (initial) value" setting. Important: preserve all the spaces and date format, use my value as a sample!

2) If you want to set min/max date to smth like "4 days ahead of today" then try putting smth like this "new Date().fp_incr(4)" into min or max value settings. Exactly this code sets the date 4 days ahead of today. Change "4" to another integer value to adjust number of days.