Calendar customization

  • anna
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 10 months ago #45921 by anna
Calendar customization was created by anna
Hi,
I'd like to customize booking calendar because I'd like to change the color of thath day in which users cannot book any services.
Could I add a different css class for those days? In which file can I work?
Thank you for your help!
A.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #45922 by Mr. Dam
Replied by Mr. Dam on topic Calendar customization
Hi Anna,
You can modify page:
components > com_osservicesbooking > helpers > calendar.php
function: initCalendar
Thanks
Dam

Please Log in or Create an account to join the conversation.

  • anna
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 10 months ago #45923 by anna
Replied by anna on topic Calendar customization
Excuse me Dam,
should I edit the function? Or there are some rows in which this kind of days (e.g.: days before today, days without services) are classified?
Could you help me?
Thanks,
A.

Please Log in or Create an account to join the conversation.

  • anna
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 10 months ago #45933 by anna
Replied by anna on topic Calendar customization
Hi Dam.
I separated days before today from days after today.

I'd like to know in what file I can set and define another class different by 'calendar_currentdate_style' and 'calendar_normal_style'.

I'd like also to know how I can define a class for those days in which there aren't available services.

Thank you a lot,
A.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #45944 by Mr. Dam
Replied by Mr. Dam on topic Calendar customization
Hi Anna,
Unfortunately, OS Services Booking doesn't have option to show class for the dates in which there aren't available services
Thanks
Dam

Please Log in or Create an account to join the conversation.

  • anna
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 10 months ago #45955 by anna
Replied by anna on topic Calendar customization
Hi Dam,
I need your help :)
1) I have edited calendar days before today and I'd like to give them another colour.
I think It's simple but I don't find file I must edit.
In calendar.php I edited code:
for($i=1;$i<=$number_days_in_month;$i++){
$j++;

//check to see if today
if(($i == $current_date) and ($month == $current_month) and ($year == $current_year)){
$classname = $configClass;
}
elseif(($i < $current_date) and ($month <= $current_month) and ($year <= $current_year)){
$classname = $configClass;
}
elseif(($month < $current_month)){
$classname = $configClass;
}

else{
$classname = $configClass;
}

?>

So I have some days with another style. I need to set 'calendar_new_style' to a gray colour so peolple can understand in those days booking is not available. I think this is a simple custmization. Could you help me to end it?

2) To link calendar to available service could you do it for my customer if he pays you? How much does it cost this upgrade?
Thanks for your help and have a nice day.
A.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #45956 by Mr. Dam
Replied by Mr. Dam on topic Calendar customization
Hi,
I have tested it, but we have a problem
1. Add another css class (not available) class called A.
2. Click on the date, the date is changed to css class B (activate date)
3. Click on other date, system can't revert css class of item to A.
Thanks
Dam

Please Log in or Create an account to join the conversation.

  • anna
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 10 months ago #45961 by anna
Replied by anna on topic Calendar customization
Thank you Dam.
I must solve this problem for my customer. Calendar isn't intuitive for him and he asked me another solution.
I like your component and before I change it I'd like to know if we can answer together to this request.
I can pay your work if you say to me how much does it could cost.
I'm waiting for your answer!
Thank you!
A.

Please Log in or Create an account to join the conversation.

Moderators: Mr. Dam