Jump to content

[solved] Datepicker in HelperForm ?


Recommended Posts

Hello,

 

does anyone know if it's possible to have a datepicker in a helperform, such as being used in the Backoffice > Statistics ?

 

the official documentation ( http://doc.prestashop.com/display/PS15/HelperForm ) doesn't mention it, but perhaps someone here can help me out :)

 

thanks in advance!

Edited by dhobo (see edit history)
Link to comment
Share on other sites

Hi,

yes Prestashop uses type 'date' in its RenderForm methods, for example you can investigate AdminSupplyOrdersController.php there is 

$this->fields_form['input'][] = array(
'type' => 'date',
'label' => $this->l('Expected delivery date:'),
'name' => 'date_delivery_expected',
'size' => 10,
'required' => true,
'desc' => $this->l('The expected delivery date for this order is...'),
);

together with

$this->addJqueryUI('ui.datepicker');
  • Like 2
Link to comment
Share on other sites

  • 10 months later...

 

Hi,

yes Prestashop uses type 'date' in its RenderForm methods, for example you can investigate AdminSupplyOrdersController.php there is 

$this->fields_form['input'][] = array(
'type' => 'date',
'label' => $this->l('Expected delivery date:'),
'name' => 'date_delivery_expected',
'size' => 10,
'required' => true,
'desc' => $this->l('The expected delivery date for this order is...'),
);

together with

$this->addJqueryUI('ui.datepicker');

 

Hi Mariia,

 

How would I be able to use this in Prestashop 1.6? 

 

Ideally I'd like to have the date picker on the product page and part of the required* steps in order to purchase.

 

Not sure if it's allowed through the forums to make an offer of payment, but I'd be willing to pay for the implementation of this!

 

I look forward to your reply!

Link to comment
Share on other sites

  • 1 month later...
[solved] Datepicker:

Hello Guys please help me. I am create a form on my category.tpl page(General html form not prestashop controller base form). Now i want to show datepicke on my input field !! Here i can't do anthing to showing datepicker on my date field

any one can help me ?? please

My code :: <input type="text" id="datepicker" name="searchDate"> in category.tpl how can i get datepicker in this field . if i get form from controller how its possible ?? please help me.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

 

Hi,

yes Prestashop uses type 'date' in its RenderForm methods, for example you can investigate AdminSupplyOrdersController.php there is 

$this->fields_form['input'][] = array(
'type' => 'date',
'label' => $this->l('Expected delivery date:'),
'name' => 'date_delivery_expected',
'size' => 10,
'required' => true,
'desc' => $this->l('The expected delivery date for this order is...'),
);

together with

$this->addJqueryUI('ui.datepicker');

Dear

I did same on my site qyntra.com, but it is not working, please help me

 

thanks

Link to comment
Share on other sites

  • 6 months later...
  • 1 year later...

how its work in informations.tpl in admin create product form?

 

there is not renderform in tpl.

i used this code here:

<div class="form-group">
				<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="data_final" type="default"}</span></div>
				<label class="control-label col-lg-2" for="data_final_{$id_lang}">
					{l s='Data do Curso:'}
				</label>
				<div class="col-lg-9">
					<div class="input-group fixed-width-md">
						
						
						{include file="controllers/products/input_text_lang.tpl"
							languages=$languages
							input_class="datepicker"
							input_value=$product->data_final
							input_name="data_final"
							required=true
						}
				
						<div class="input-group-addon">
							<i class="icon-calendar-empty"></i>
						</div>
					</div>
				</div>
			</div>
Link to comment
Share on other sites

×
×
  • Create New...