Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Change Week Format in Drop-down "Select Week"
(1 viewing) (1) Guest
Universal booking and reservations component for Joomla!.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1
  • 2

TOPIC: Change Week Format in Drop-down "Select Week"

Change Week Format in Drop-down "Select Week" 10 years, 8 months ago #43935

Is there a way to change the formatting of the dates in the drop-down box on the week layout view? This is currently what the formatting looks like, Select Week - 23/2014 (2.6 - 8.6). I would like for it to look like this, Select Week - 23/2014 (6/2 - 6/8). I have found ways to change all the rest of the date formatting, except this drop-down menu. Thanks!
The topic has been locked.

Re: Change Week Format in Drop-down "Select Week" 10 years, 8 months ago #43940

  • vebi
  • OFFLINE
  • Posts: 444
Hello,

formatting is possible to change in Booking Configuration/Formatting/ Use Custom.
ARTIO Support Team
The topic has been locked.

Re: Change Week Format in Drop-down "Select Week" 10 years, 8 months ago #43962

Thanks for your reply. However, I have already updated the settings under Configuration > Formatting, but the "Select Week" dropdown is not being affected by that. As you can see in the first screenshot, I have the custom formatting selected, and it's affecting most of the formatting except that "Select Week" drop-down menu that you can see in the second screenshot. How can I change this?

screenshot1.jpg


scrrenshot_2.jpg
The topic has been locked.

Re: Change Week Format in Drop-down "Select Week" 10 years, 8 months ago #43969

  • vebi
  • OFFLINE
  • Posts: 444
Hello,

unfortunately that format is not supported at the moment but you can modify it yourself here
/administrator/components/com_booking/helpers/html.php method AHtml::getWeekSelect

or we can provide you a paid customization (1 hour) if you want.
ARTIO Support Team
The topic has been locked.

Re: Change Week Format in Drop-down "Select Week" 10 years, 8 months ago #43992

Thank you so much!!! I got it working by changing the code to this...

function getWeekSelect($name, $selectedWeek, $selectedYear, $deep, $attribs = '')
{
$arr = array();
for ($i = 0; $i <= $deep; $i ++) {
$date = JFactory::getDate('+ ' . $i . ' week');
$date->modify('this week');

$week = (int) $date->format('W');
$week1 = $date->format("n/j");
//in php 5.2 retur null, in php 5.3 return DateTime Object
$date->modify('+6 days');
$week2 = $date->format("n/j");
$year = (int) $date->format('Y');
$text = $week .'/'.$year.' ('.$week1 . ' - ' . $week2.')';
$arr[] = JHTML::_('select.option', $week . ',' . $year, $text);
}
return JHTML::_('select.genericlist', $arr, $name, $attribs, 'value', 'text', $selectedWeek . ',' . $selectedYear);
}
The topic has been locked.

Re: Change Week Format in Drop-down "Select Week" 10 years, 8 months ago #44001

  • vebi
  • OFFLINE
  • Posts: 444
Hello,

I have to just inform you that your customization will be overwritten after you make update.
ARTIO Support Team
Last Edit: 10 years, 8 months ago by vebi.
The topic has been locked.
  • Page:
  • 1
  • 2
User Login Empty