Skip to content
This repository has been archived by the owner on Aug 20, 2022. It is now read-only.

Added specialClass styling and implementation #232

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

amattu2
Copy link

@amattu2 amattu2 commented Dec 26, 2019

For my personal usage, I needed a way to indicate holidays in a minor way, as such:

Implemented a specialClass styling and JavaScript implementation. By default, it appears as a 5px by 5px dot under the date. This could be used to symbolize a special date or otherwise.

See December 24th, 2019 in the below screenshot for default styling
screenshot

From the CHANGELOG.md

# Changelog

## 1.1.0 (Dec 26, 2019)

- Added `special` function and associated CSS

### Methods

- Added 1 new method: `special`

From the documentation:

### specialClass

- Type: `String`
- Default: `special`

A class (CSS) for the specialClass date item.


### special

- Type: `Function`
- Default: `null`
- Syntax: `special(date, view)`
  - `date`: the date for checking.
  - `view`: the the current view, one of `day`, `month` or `year`.

Add `specialClass` class to date item. If return a `true` value, the `specialClass` class will be added to the item. The default style is a 5px by 5px black dot under the date text item.

[...]

Added `special` function JS implementation and styling
Addressed an issue that caused specialClass not to be added on anything that is not the year view.
Addressed an issue that caused specialClass not to be added on anything that is not the year view.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant