Date Picker
1 Attachment(s)
I need to insert a new element in Order Info page as a datetime picker. How can i achive this task. Is anyone that can help me ?
This is my decoration of Info class : class Info extends \XLite\View\Order\Details\Admin\Info implements \XLite\Base\IDecorator { /** * Get order delivery date * * @return string */ protected function getDeliveryDate() { $_POST['order'] = $this->getOrder(); if($this->getOrder() != null){ if($this->getOrder()->delivery_date != null || $this->getOrder()->delivery_date != FALSE){ $delivery_date = date('d-m-Y', $this->getOrder()->delivery_date); }else{ $delivery_date = null; } }else{ $delivery_date = null; } return $delivery_date; } } |
Re: Date Picker
The standard date picker widget is this one: \XLite\View\DatePicker (decorates the \XLite\View\FormField\Input\Text field widget).
It was designed to work inside model form widgets, but you can insert it into any template as follows: HTML Code:
The custom form class can be as simple as this: PHP Code:
|
All times are GMT -8. The time now is 04:22 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.