Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use custom classes in the calendar #10

Merged
merged 5 commits into from
Nov 18, 2019
Merged

Conversation

keesiemeijer
Copy link
Contributor

This PR adds custom control over the classes used in the calendar. It allows you to have calendars styled differently from the base style (e.g. table.SimpleCalendar.small). It can also fix conflicts with styles from other packages using the same class selectors as used in the calendar (e.g. .today, .event).

Example using custom classes.

$calendar = new donatj\SimpleCalendar();
// add a `small` class to the calendar
$calendar->setCalendarClasses( array( 'calendar' => 'SimpleCalendar small' ) );
$calendar->addDailyHtml( 'Sample Event', 'today', 'tomorrow' );
$calendar->show( true );

This pr also adds a div.events container for the events. This allows you to add a scroll bar to a td tag.
https://stackoverflow.com/a/14058571

@donatj
Copy link
Owner

donatj commented Jul 10, 2017

Thank you for your PR! I am currently in process of a fairly major rewrite as this code is all in all kinda creeky. However it will include the ability to change class names, as well as some other problems handling "shown date" vs "current date".

I will take your wrapping of the day's events into consideration though as that is a nice feature I had not considered.

I will leave this open for the time being as a reminder that I need to get that out the door. Thank you.

@keesiemeijer
Copy link
Contributor Author

I'm looking forward to the changes

@hopeseekr
Copy link

💯 THANK YOU FOR THE PR!!

I have successfully used this in my own app... If I remember, I'll post a link to the website here once it's launched!

@donatj donatj changed the base branch from master to 1.x November 18, 2019 19:58
@donatj donatj merged commit d86444a into donatj:1.x Nov 18, 2019
@donatj
Copy link
Owner

donatj commented Nov 18, 2019

This was merged into the 1.x branch at #12

@donatj
Copy link
Owner

donatj commented Jan 11, 2023

@keesiemeijer / @hopeseekr - Well it's dumb but this finally made it into a release - see: https://github.com/donatj/SimpleCalendar/releases/tag/v0.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants