Highlighting a date range. #21
CarlTyler
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted to highlight a range of dates with the same background as a selected week. I did it using the following method.
First add this to your calendar definition.
customDateProps: (date) => ({ classes: 'thisIsADay', data: { type: 'date', form: 'date-object' } })
Then after your mini cal is loaded
$( ".thisIsADay" ).each(function( index ) { if (moment($( this ).data().date).isBetween(startDate, endDate,undefined,'[]')){ $(this).css("background-color", "#efefef") } })
I hope this is of use to someone.
Beta Was this translation helpful? Give feedback.
All reactions