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.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.