We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Calling the date-picker on a custom field

Developer Preview

Reinos's avatar
Reinos
79 posts
7 years ago
Reinos's avatar Reinos

In EE3 we got a nice looking date-picker. Is there any change we can re-use it? By inspecting the element i see a attr rel=”date-picker”. But placing this on a field, does not work.

Question; how can we use the date-picker?

       
Kevin Cupp's avatar
Kevin Cupp
791 posts
7 years ago
Kevin Cupp's avatar Kevin Cupp

There isn’t a great reusable solution to this, it will involve some copying and pasting. Take a look at mcp.simple_commerce.php towards the bottom of the purchaseForm() method. You have to set all those global JavaScript variables and ultimately include the cp/date_picker file. And if you look at the purchase_date field configuration, you’ll see you can set a data-timestamp= attribute to assign an initial date to the field.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.