Open jwasilgeo opened 2 years ago
From triage discussion:
Updating the time estimate to accommodate two requests, per discussion with @eriklharper:
estimate-5
estimate-3
estimate-8
Design will encompass a disabled color state prior to implementation and next steps.
In addition to allowing arrays of dates to be disabled and allowing arrays of dates to be styled by the user via css vars, below shows the current day support to be built into Date Picker. Figma file specs
@macandcheese do you think current day support needs to be opt in?
cc @geospatialem, @brittneytewks
Next steps, which may take place over multiple milestones depending on the discussions:
Internal discussions between design and engineering teams on the functionality of the API and Figma look and feel
Description
Is there an API currently available to set properties and, separately, change styles/themes of individual
calcite-date-picker-day
s from the level of the parentcalcite-date-picker
orcalcite-input-date-picker
?The goal is to let individual
calcite-date-picker-day
properties or styles/themes be data-driven and easily applied via the parentcalcite-date-picker
orcalcite-input-date-picker
APIs.If not, I request a formal API enhancement, or clarified documentation. Thanks!
For a property example, I would want to set any number of arbitrary, individual days as
disabled
, as documented as a capability here: https://github.com/Esri/calcite-components/tree/v1.0.0-beta.74/src/components/calcite-date-picker-day#propertiesAs a rough and hacky example of what I could figure out on my own, today at
v1.0.0-beta.74
I'd need to somehow hook into each month change event by the user (<left || right > user button click) when the new month gets rendered, and then try to access an individualcalcite-date-picker-day
in the shadow DOM to change itsdisabled
property:As a style/theme example, I would want to change the individual background-color of a individual day to indicate to a user that there is some other attribute at play and they should pay special attention to that day. For example, in the
calcite-*-date-picker
UI, Friday the 13th would appear to have a background ofhotpink
ordeepskyblue
or some other custom styling, because reasons.Acceptance Criteria
As a developer using
calcite-date-picker
orcalcite-input-date-picker
, I can affect properties and/or styles/themes of individualcalcite-date-picker-day
s rendered in each month of the parent UI.Or, restated by borrowing a line from the section above:
Relevant Info
No response
Which Component
Focused on:
calcite-date-picker-day
Related to:
calcite-date-picker
andcalcite-input-date-picker
Example Use Case
@esri/calcite-components@1.0.0-beta.74
Consider the following screenshot with desired behavior:
disabled = true
hotpink
: available as another choice that the user can click on, but custom styling indicates something unique about this day.