How To Setup The Datetimepicker In Storefront

Hi,

I want to add the Date-time picker in a pop up window of the storefront (Frontend).

I already added a date picker, But my requirement is to add the Date-time picker. Please check the attachment about my requirement.

Anybody please help me to resolve my issue.

Regards,

Satya.

popup.png

I am afraid, built-in date picker does not support time feature. It is require to include another 3rd party picker. E.g.

http://www.jqueryrain.com/demo/jquery-date-time-picker/

As alternative you can use HTML 5 date-time picker. But it is not supported by all browsers:

http://www.w3schools.com/html/tryit.asp?filename=tryhtml_input_datetime

I am afraid, built-in date picker does not support time feature. It is require to include another 3rd party picker. E.g.

http://www.jqueryrain.com/demo/jquery-date-time-picker/

As alternative you can use HTML 5 date-time picker. But it is not supported by all browsers:

http://www.w3schools.com/html/tryit.asp?filename=tryhtml_input_datetime

Hi eComLabs,

I searched the link you provided {Jquery examples}, But i didn't find the solution. I want the Datetime picker which was using in the Promotions in Admin Panel. Please check the attachment. How to set up that picker in the storefront (Frontend).

Please help me to solve the issue, It's a high priority to me.

Regards,

Satya.

image1.png

Are you sure that no any 3rd party module extends default picker?

I do not see the ability to select time in the latest demo:

http://prntscr.com/9manb2

Hi,

I have checked with all the other 3rd party modules i'm having.

I have a 3rd party module, It was overriding the promotions module. When enabling this i'm getting that datetime picker. I have used the datepicker code in it as follows,


{__("avail_from")}:

{include file="common/calendar.tpl" date_id="date_holder_from" date_name="promotion_data[from_date]" date_val=$from_date|default:$smarty.const.TIME start_year=$settings.Company.company_start_year extra=$smarty.capture.calendar_disable}


{section name=day_time start=0 loop=24 step=1}
{$smarty.section.day_time.index}:00
{/section}



It was showing the date perfectly, But the Time dropdown is not coming.

Please check the code and guide me where was i am doing wrong.

Regards,

Satya.

It is not displayed at all or you just see an empty selectbox?

It is not displayed at all or you just see an empty selectbox?

Hi eComLabs,

It is showing the selectbox with 0:00 option, But the dropdown is not working.

Regards,

Satya.

Hi eComLabs,

It is showing the selectbox with 0:00 option, But the dropdown is not working.


Regards,
Satya.

Try to remove the following code (in two places):

{if !$promotion_data.from_date && !$promotion_data.to_date}disabled="disabled"{/if} 

Try to remove the following code (in two places):

{if !$promotion_data.from_date && !$promotion_data.to_date}disabled="disabled"{/if} 

Thank you, It is working now.

Regards,

Satya.

Thank you, It is working now.

Regards,
Satya.

You are welcome!