diff --git a/package.json b/package.json index d097ddf..5bf962a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tp/tp-date-picker", - "version": "2.0.2", + "version": "2.1.0", "description": "", "main": "tp-date-picker.js", "scripts": { diff --git a/tp-date-picker.js b/tp-date-picker.js index a5f6493..fc5bc69 100644 --- a/tp-date-picker.js +++ b/tp-date-picker.js @@ -114,6 +114,27 @@ class TpDatePicker extends FormElement(LitElement) { .pointer { cursor: pointer; } + + .event-dots { + display: flex; + gap: 4px; + justify-content: center; + position: absolute; + bottom: 8px; + left: 0; + right: 0; + } + + .event-dot { + width: 4px; + height: 4px; + border-radius: 50%; + background-color: var(--tp-datepicker-event-dot-color, #666); + } + + div[part~="date"] { + position: relative; + } ` ]; } @@ -159,8 +180,20 @@ class TpDatePicker extends FormElement(LitElement) { ${curMonth.map(d => { const matchesValue = this.equalDate(d, value); const isToday = this.equalDate(d, today); + const eventCount = this.countEventsForDate(d); + return html` -