Post by lightworks » Thu Jun 07, 2018 5:43 pm

Anyone any idea how to set the datepicker mindate in OC3? Thanks.

Newbie

Posts

Joined
Sat Jul 21, 2012 6:51 am

Post by straightlight » Sun Jun 10, 2018 10:51 pm

After the:

Code: Select all

<div class="input-group date">
line on the TWIG file, ensure to have the:

Code: Select all

data-date-format="YYYY-MM-DD" data-locale="{{ datepicker }}"
portion added after the: placeholder="x". Then, at the bottom of the TWIG file, add:

Code: Select all

<script type="text/javascript"><!--
$('.date').datetimepicker({
	language: '{{ datepicker }}',
	pickTime: false
});

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

$('.datetime').datetimepicker({
	language: '{{ datepicker }}',
	pickDate: true,
	pickTime: true
});
//--></script>
(normally above the {{ footer }} variable). This should do it.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 17 guests