| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
#1
|
|||||||
|
|||||||
Date Picker
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; } }
__________________
alex |
|||||||
#2
|
|||||||||
|
|||||||||
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:
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions Last edited by qualiteam : 02-26-2018 at 11:33 PM. |
|||||||||
|
|
|||
X-Cart forums © 2001-2020
|