Post by OpenCode3.0 » Sun Nov 06, 2022 2:21 am

I'm trying to find a way to add one extra hour to the pickup option time so we can have one hour to prepare the package for pick up.
the regular function for time is the following

Code: Select all

$('.time').datetimepicker({
  language: '{{ datepicker }}',
  pickDate: false,
});
I try the

Code: Select all

moment().add(1, 'hour')
to the pickTime but doesn't work is there a way I'm sure there is but can anyone point me to or show me how is done?

opencart-3.0.3.8

Thank You

Newbie

Posts

Joined
Sun Apr 17, 2022 1:51 am

Post by OSWorX » Sun Nov 06, 2022 1:22 pm

OpenCode3.0 wrote:
Sun Nov 06, 2022 2:21 am
I try the

Code: Select all

moment().add(1, 'hour')
to the pickTime but doesn't work is there a way I'm sure there is but can anyone point me to or show me how is done?
Should'nt it be hours ?
See e.g. https://github.com/Eonasdan/tempus-dominus/issues/1548

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by OpenCode3.0 » Mon Nov 07, 2022 1:00 am

OSWorX wrote:
Sun Nov 06, 2022 1:22 pm
OpenCode3.0 wrote:
Sun Nov 06, 2022 2:21 am
I try the

Code: Select all

moment().add(1, 'hour')
to the pickTime but doesn't work is there a way I'm sure there is but can anyone point me to or show me how is done?
Should'nt it be hours ?
See e.g. https://github.com/Eonasdan/tempus-dominus/issues/1548
@ OSWorX - Thanks for the response...
unfortunately, it doesn't work.

Code: Select all

$('.time').datetimepicker({
	language: '{{ datepicker }}',
	pickDate: false,
	timeFormat: 'hh:mm tt',// try this doesn't work
	minDate: moment().add(1, 'hours'),// the I  try this doesn't work
	toHourtimepicker: moment().add(1, 'hours'),// the I  try this doesn't work
});
it seems like something else is missing or something in the OC core doesn't like the changes or prevents the from changing...
yes, I cleared the cache, theme cache refresh modification, etc, etc nothing works!
if anyone has a better idea shot it in the forum maybe someone else needs it in the future.

Thank You all tho

Newbie

Posts

Joined
Sun Apr 17, 2022 1:51 am

Post by paulfeakins » Mon Nov 07, 2022 8:41 pm

If you can't get a free answer here, you could pay a developer such as ourselves or post a job in the Commercial Support Forum.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 14 guests