1818charlie
ECT Moderator
United Kingdom
1198 Posts |
Posted - 02/04/2022 : 04:56:22
In the Adding a Text Input Option help section under Date Picker there is a setting for the includes file to disable certain dates. The help page states You can also disable specific days, which may be holidays for example with this addition to includes.php. Having added that to includes as it is, those dates are still selectable. I have also changed the format of the line in blue to 25-12 to align with the date format in green below but still the disabled date(s) are selectable Any ideas? $ectpopcalendarjs="var ectpopcaldisabled='12-25;1-1;03-30';";The other line added to includes is this one to use the date, month, year format. $ectcaldateformat="dd/mmm/yyyy"; https://www.ecommercetemplates.com/help/product-options.asp#text Steve Bolton Lancashire
Edited by - 1818charlie on 02/07/2022 10:58:37
|
ITZAP
Ecommerce Template Guru
Australia
1018 Posts |
Posted - 02/05/2022 : 16:13:42
Hi Steve, running PHP v7.4.6, I have these includes.php entries which work fine: // DATE PICKER PRODUCT OPTION (Pop-Up Calender, New v6.7.0) $ectcaldateformat="d mmm yyyy"; // Show selected date in Australian format, for example 22 September 2017 $ectpopcalendarjs="ectpopcalstartmonday=true;var ectpopcaldisabled='12-25;1-1';"; // Start Monday, Disable Holiday Dates, mm-dd Your code looks OK, except my date format is different to yours. Maybe try that. Gary 
|
1818charlie
ECT Moderator
United Kingdom
1198 Posts |
Posted - 02/05/2022 : 17:16:45
Hi Gary, thanks for your reply. I have just tried your suggestion & still the 'none selectable dates' are selectable. The other options to disable the current date & dates in the past work fine, just this one of selecting certain dates. At the current time I can't see it becoming a big issue on this particular customers site but I can guarantee if it's not working someone will want it working.  Steve Bolton Lancashire
|
Vince
Administrator
42874 Posts |
Posted - 02/06/2022 : 02:57:01
|
1818charlie
ECT Moderator
United Kingdom
1198 Posts |
Posted - 02/06/2022 : 04:55:52
Hi Vince FTP details en-route Cheers  Steve Bolton Lancashire
|
Vince
Administrator
42874 Posts |
Posted - 02/07/2022 : 08:28:58
|
1818charlie
ECT Moderator
United Kingdom
1198 Posts |
Posted - 02/07/2022 : 10:57:48
Good evening Vince Thanks for your time with this one. I was relying on Notepad++ via Find feature & choosing to search for $ectpopcalendarjs= which only shown one entry. I wasn't aware of the other GLOBALS one, I am now! This may help anyone else who may want to disable certain dates in the calendarIf using the UK/European date format entry in includes.php, $ectcaldateformat="d/mmm/yyyy";, if you also need/want to disable certain dates then those dates MUST be in the US format of mm-dd. Putting the dates as UK/European format has no effect. Steve Bolton Lancashire
Edited by - 1818charlie on 02/07/2022 11:00:13
|
Vince
Administrator
42874 Posts |
Posted - 02/08/2022 : 01:17:55
|
1818charlie
ECT Moderator
United Kingdom
1198 Posts |
Posted - 03/06/2022 : 06:30:08
Well it's been a full month since implementing the calendar date picker & overall it has been a success.
Vince, is it possible for the calendar to be set so that choosing a future date is a minimum three days in advance?
----------------------------------- Steve Manchester UK
Make it as simple as possible, but not simpler.
|
Vince
Administrator
42874 Posts |
Posted - 03/06/2022 : 10:44:35
Hi Steve quote: Well it's been a full month since implementing the calendar date picker & overall it has been a success.
That's great to hear!!  quote: Vince, is it possible for the calendar to be set so that choosing a future date is a minimum three days in advance?
How about something like this in the includes.php file... $ectpopcalendarjs="var ectpopcaldisabled='" . date('m-d') . ';' . date('m-d',strtotime("+1 day")) . ';' . date('m-d',strtotime("+2 day")) . "';"; Vince Click Here for Shopping Cart SoftwareClick Here to sign up for our newsletterClick Here for the latest updater
|
1818charlie
ECT Moderator
United Kingdom
1198 Posts |
Posted - 03/06/2022 : 11:09:36
Hi Vince That has done the trick nicely, thank you  ----------------------------------- Steve Manchester UK Make it as simple as possible, but not simpler.
|
|
|