Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Add datepicker docs to 12.5 release branch (#12346)

Parimal Satyal945b4fcab11a
diff --git a/frontend/src/app/spot/components/tooltip/stories/Tooltip.stories.mdx b/frontend/src/app/spot/components/tooltip/stories/Tooltip.stories.mdx
index 2b384d52e91..2907fc8bdb6 100644
--- a/frontend/src/app/spot/components/tooltip/stories/Tooltip.stories.mdx
+++ b/frontend/src/app/spot/components/tooltip/stories/Tooltip.stories.mdx
@@ -25,23 +25,21 @@ import { SbTooltipComponent } from './Tooltip.component';
# Tooltip
-> Example of a tooltip
+> Example of a tooltip, configurable (info tooltip, text: "This is the current project you are in.")
The tooltip provides additional textual context on hover over interactive elements.
This context can be used to provide additional information (hover over a "help" icon) or to signal state information (for example, if a certain item is disabled).
-By default, they take 100% of the width of the containing element. However, max-width should be specified manually for each tooltip, depending on the circumstances and placement of the element.
+By default, the tooltip takes 80% of the width of the container. This can be overridden if needed.
> Eg. Tooltip on a file list, on a file that is not available due to permissions issues
## Structure and Options
-The tooltip is simply a text label.
+Tooltips have a sky blue background in the default theme (_Feedback/Info/Light_). A darker version is available is but currently not used.
-Tooltips by default have a dark gray background (_Gray 1: #333_), but a lighter version is also available with a sky blue background in the default theme (_Feedback/Info/Light_).
-
-> Example of a tooltip with a light background
+> Example of the darker one
export const Template = (args) => ({
parameters: {
@@ -71,19 +69,33 @@ export const Template = (args) => ({
## Behaviour
-The tooltip appears next to the item being hovered (which must never be covered), but does not follow the cursor. Hovering out of the element that triggered it will cause the tooltip disappear.
+The tooltip should appear either above or below the item being hovered. By default, it will be displayed above, left-aligned. This can be manually changed to these alternative positions:
-Tooltips automatically align themselves to the top or the bottom of the element it is attached to, depending on the positioning of the element in the viewport.
+- Above, left-aligned
+- Above, center-aligned
+- Above, right-aligned
+- Below, left-aligned
+- Below, center-aligned
+- Below, right- aligned
-## Margins and Spacing
+The item over which the user is hovering itself must never be covered. A tooltip' does not follow the cursor; its position is fixed as long as the user is hovering over the item. Hovering out of the element will cause the tooltip to disappear.
+
+The tooltip will appear 200 ms after the user starts hovering and disappear 200 ms after the user has moved the cursor away, to avoid jittery behaviour.
+
+The tooltip will automatically become multi-line if necessary (i.e, if the container does not have sufficient space).
-A tooltip's width is generally determined by the containing text.
+> Example: multi-line tooltip (so a very long one). Text: ""
-However, due to technical limitations, there is a hard min-width of 20-rem and a max-width of 90vw. Tooltips shorter than 20-rem will have additional space on the rigth.
+## Dos and Don'ts
-The minimum width of the tooltip depends on the length of the text, and the maximum width depends on the width of the containing element.
+A tooltip is, in its basic form, a line of text. However, it can also contain icons.
+
+It must never contain interactive elements (a mouse pointer will not always be able to reach it).
+
+## Margins and Spacing
-A tooltip can be multi-line if necessary. It is never truncated.
+A tooltip will never hug either side of the container; it will respect the internal padding of the that container.
-> Eg. A long multi-line tooltip
+> Position, in-tree or out-of-tree to be decided
+Due to technical limitations, the minimum width of a tooltip is defined by its container (i.e, 80% of it). Tooltips with content shorter this width will have additional space on the right.
diff --git a/frontend/src/stories/Colors.stories.mdx b/frontend/src/stories/Colors.stories.mdx
index 97f48d896ea..f23eb24be48 100644
--- a/frontend/src/stories/Colors.stories.mdx
+++ b/frontend/src/stories/Colors.stories.mdx
@@ -21,7 +21,7 @@ export const ColorsPreview = ({ tokens }) => <div className="colors">
# Colors (WIP)
-**Note: These colours are neither completely implemented nor used in code. This remains a work in progress.**
+**Note**: This section is a work-in-progress. If you are unsure about which colour to use, please get in touch with the UX team.
Because OpenProject can be customised with custom colour schemes, our foundation library only describe the colour palette of the default OpenProject theme.
@@ -42,7 +42,7 @@ The basic colour set include eight shades of gray used mostly for basic text and
The choice of which gray to use depends on the colourspace.
-Note: **Basic/_Gray-1_** is the default colour for "black" text.
+Note: **Basic/_Gray-1_** is the default colour for "black" text. Pure black (_Basic/Black_) is generally not used in OpenProject.
> Code example here (Black, Gray-1, Gray-2, Gray-3, Gray-4, Gray-5, Gray-6, White)
@@ -141,12 +141,6 @@ This darker version of the main danger red is used:
Indication colours are used to indicate certain special states.
-**Indication/_Attention_**
-
-> Example
-
-Attention is used to draw user attention to certain updates on the screen, like in the Notification center. In certain cases, these badges can also be associated with a number.
-
**Indication/_Flagged_**
> Example
@@ -159,6 +153,18 @@ This colour is used when “flagging” work packages. It is a teal colour meant
This colour is used to indicate the current date (today) in a calendar.
+**Indication/_Enterprise_**
+
+> Example
+
+This colour is used to indicate that a certain feature or module requires the Enterprise plan to use.
+
+**Indication/Focus**
+
+> Example
+
+This is the colour used to indicate which element has keyboard focus.
+
## Feedback
The **Feedback/**- colors are used to communicate for user feedback:
@@ -174,25 +180,25 @@ These are typically used in toast messages.
**Feedback/_Error_**
-> Example
+> Example, Error Light and Dark
This colour indicates that a response that is different from what the user would have expected. The user flow is usually interrupted when they see an error of this type.
**Feedback/_Warning_**
-> Example
+> Example, Warning Light and Dark
The warning is information that suggests something requires attention (and that could cause a problem), but that no error has been caused, and that the expected user flow can continue.
**Feedback/_Info_**
-> Example
+> Example, Info Light and Dark
This colour is used to indicate additional information that could be of interest to the user. (Like a toast that says “Loading...”, indicating something is happening in the background)
**Feedback/_Success_**
-> Example
+> Example, Success Light and Dark
This colour indicates that the requested user action was successful. It should be used sparingly and only when such a feedback is absolutely required.
diff --git a/frontend/src/stories/Datepicker-Basic.stories.mdx b/frontend/src/stories/Datepicker-Basic.stories.mdx
new file mode 100644
index 00000000000..755bc54827a
--- /dev/null
+++ b/frontend/src/stories/Datepicker-Basic.stories.mdx
@@ -0,0 +1,65 @@
+import { Meta, Story, Canvas } from '@storybook/addon-docs';
+
+<Meta title="Patterns/Date Picker (2): Basic" />
+
+# Basic Date Picker
+
+Basic date pickers are attached to existing date input fields and is displayed as a drop-down when that date input field is in focus. It consists of only the mini-calendar component.
+
+Unlike the Work package and Modal variants, the basic date picker does not trap focus and as such does not allow for any keyboard navigation.
+
+> **Example**: An example of a basic date picker (with input field)
+
+## Sub-variants
+
+The structure is very basic and consists only of one mini calendar. There are two sub-variants:
+
+### Single
+
+**Single** allows picking just one date (2023-02-09)
+
+> **Example**: An example of a basic range date picker (with date pre-filled in the attached date input field)
+
+### Range
+
+**Range:** allows inputing a range (2023-02-09 - 2023-02-14), and shows the date picker with two months.
+
+> **Example**: An example of a basic range date picker (with date pre-filled in the attached date input field).
+
+## Mobile
+
+The basic date picker does not have a mobile version. On mobile devices, Flatpickr will automatically gracefully degrade to the device's native date picker.
+
+## Margins and spacing
+
+1 rem between horizontal groupsets
+
+
+## Accessibility
+
+The date picker itself never receives focus (and thus does not afford keyboard navigation or screen reader compatibility; see [Date Picker: Common elements](#) for accessibility shortcomings of of Flatpickr). However, the date input field that the date picker is attached to can receive focus, and all users can type in the desired date in the ISO format.
+
+_To be completed_
+
+## Usage
+
+This date picker is used in:
+
+**Single:**
+
+- Log time
+- Log unit costs
+- Custom fields (work package and project)
+- Meeting minutes
+- Work package table filters
+- Work package bulk edit form
+- Announcement edit form
+- Version new and edit form and custom fields
+- Project filters
+- Cost report filters
+- Budget forms
+- Dynamic forms
+
+**Range:**
+
+- Pause date reminders
diff --git a/frontend/src/stories/Datepicker-Common.stories.mdx b/frontend/src/stories/Datepicker-Common.stories.mdx
new file mode 100644
index 00000000000..c283e92f612
--- /dev/null
+++ b/frontend/src/stories/Datepicker-Common.stories.mdx
@@ -0,0 +1,286 @@
+import { Meta, Story, Canvas } from '@storybook/addon-docs';
+
+<Meta title="Patterns/Date Picker (1): Common elements" />
+
+# Date picker: Common elements
+
+The date picker is a key element in OpenProject and is displayed any time the user has to input a date.
+
+> **Example**: a basic work package date picker (no banners)
+
+The most common places where users will interact with a date picker are:
+
+- Work packages (start and finish dates, milestone date)
+- Custom fields (of type date)
+- Log time and costs
+- Admin settings (specifying individual non-working days)
+- Filters
+
+## Types
+
+OpenProject offers three different types of date pickers, depending on where and how they are called.
+
+**Work package date pickers** are drop modals only used for the main *date* field of work packages (but not for custom date fields):
+
+> **Example**: a basic work package date picker (with banners, working days only ON)
+
+**Modal date pickers** are also drop modals but are only used outside the main work package date field and where a basic date picker does not provide enough options.
+
+> **Example**: a modal work package date picker (add non-working day)
+
+**Basic date pickers** are barebones dropdown date pickers that only consist of a mini-calendar (and no additional options or fields) and are attached to date input fields on focus:
+
+> **Example**: a basic date picker (filters)
+
+## External dependencies
+
+All date picker are built on the [Flatpickr javascript library](https://flatpickr.js.org/). The library gives us certain functionality out of the box with a fairly high degree of customisation, but also introduces limits (which will be mentioned below when relevant).
+
+Please read the [Flatpickr documentation](https://flatpickr.js.org/instance-methods-properties-elements/) before using or contributing to date pickers.
+
+## Building blocks
+
+All date pickers are built out of a common set of components. The basic building blocks specific to date pickers are:
+
+- Month-year selector
+- Days of the week
+- Mini day
+- Mini calendar (made of Mini days)
+- Banner
+
+Apart from the banner, all other building blocks are provided by Flatpickr and only styled in OpenProject; the design system will only describe how they are styled.
+
+Date pickers also use these other components from our design system: Selector field (switch), Form field, Action bar.
+
+### Month-year selector
+
+**Month-year** selectors allow the user to move forward/backwards in one-month increments.
+
+> **Example**: Month-year selector
+
+We use the basic structure provided by Flatpickr:
+
+- previous button: *Grey 1* text, *Primary* on hover,
+- month indicator: Body/Small Regular; *Grey 1* text
+ - this becomes drop down selector when clicked
+- year: Body/Small Regular; *Grey 1* text
+ - this becomes a text box when clicked
+- next button: *Grey 1* text, *Primary* on hover
+
+There are two sub-variants:
+
+1. arrows on both sides (for single date pickers)
+2. without the right arrow: used on the left side of a two-month range calendar
+3. without the left arrow: used on the right side of a two month range calendar
+
+### Days of the week
+
+Days of the week are headers for the mini calendar and list the days of the week in three-letter acronyms (Mon, Tue, Wed, Thu, Fri, Sat, Sun).
+
+They are set in Caption/Bold; *Grey 1* text.
+
+> **Example**: Days of the week
+
+### Mini day
+
+The mini day displays individual dates on the mini-calendar, and has a number of different states. Each of these states can be *enabled* (it is active and clickable) or *disabled* (it is inactive and not clickable).
+
+> **Example**: The different states of the mini calendar, labeled.
+>
+> Top row: enabled, bottom row: disabled.
+
+Mini days are set in Caption/Regular.
+
+- **Regular** days are the default state and cover the vast majority of cases.
+ - Enabled: *Grey 1* text on *White* background.
+ - On Hover: add stroke, 1px, Grey 3 (not-rounded)
+ - Disabled: *Grey 3* text on *White* background.
+ - Used when certain dates that are restricted by relations.
+- **A non-working day** can be a weekend or one that's individually-defined in the admin settings:
+ - Enabled: *Grey 1* text on *Grey 6* background
+ - Used when the "Working days only" switch is OFF.
+ - On Hover: add stroke, 1px, Grey 3 (not-rounded)
+ - Disabled: *Grey 3* text on *Grey 6* background.
+ - Default state, when the "Working days only" switch is ON.
+- **Selected-start, select-end or selected-single** indicate the start and finish dates of a range, or the selected date for a single date.
+ - They have 5-pixel rounding on the left for start, right for end and and on all corners for single dates.
+ - Enabled: *White* text on *Main/Primary* background
+ - Disabled: *Grey 3* text on *Grey 5* background
+ - Used when the date is already set and not user-modifiable (eg. automatically scheduled).
+- **Selected-mid** indicates working days that are included in a date range:
+ - Enabled: *Main/Primary* text on *Main/Light* background
+ - Disabled: *Grey 3* text on *Grey 5* background
+ - used when the range is already set and not user-modifiable (eg. on a parent work package that is automatically scheduled and the dates are set by its children).
+- **Selected-mid-non-spanned** indicates non-working days that are spanned (but not counted) in a date range:
+ - Enabled state does not exist (since if a date is selected, it cannot be disabled).
+ - Disabled: Main/Primary text on *Grey 6* background
+ - Used when the selected range spans non-working days that are not included (Working days only switch is ON).
+- **Today** indicates today's date.
+ - Enabled: *Grey 1* text on *Indication*/*Current* background.
+ - On Hover: add stroke, 1px, Grey 3 (not-rounded)
+ - Disabled: *Grey 3* text on *Indication*/*Current* background.
+ - Used when today falls on a non-working day and "Working days only" switch is ON.
+
+## Mini calendar
+
+The mini calendar consists of three elements:
+
+- a month-year selector
+- a days of the week line
+- a 7×5 grid of mini days
+
+> **Example**: Mini calendar showing:
+>
+> - Today
+> - Weekends
+> - Individual non-working days
+> - Selected range (spanning non-working days)
+> - Disabled date range (limited by relations)
+
+For certain months, there might be an additional (6) or one fewer (5) row, depending on the number of days in that month and the starting day.
+
+For example, a February starting on a Monday will only have lines, and a November starting on a Saturday will have six.
+
+**Note:** Work package range date picker, two mini calendars display two mini calendars side by side; the month-year select of the left one has only a left arrow and the right one has only a right arrow.
+
+## Banner
+
+Work packages often have relations to other work package that can limit how the current work package can be scheduled. Banners in the date picker provide helpful contextual information that allows users to either make more informed decisions and understand limitations and potential consequences to changes they might make.
+
+> **Example**: Desktop and mobile banners for the blue info "Available start date and finish dates are limited by relations" banner.
+
+Banners can either be **information banners** that have a blue background (*Feedback/Info/Light*) and give user information about why certain options might not be available, or they can be **warning banners** that have an orange background (*Feedback/Warning/Light*) and warn users that their actions might have other consequences.
+
+These colours are the same regardless of the theme.
+
+Banners have 0.75 rem left/right padding, 0.5 rem top/bottom padding and 0.5 spacing between these three elements:
+
+- an icon (*Info1*) on the left side, 24×24px
+- text (set in *Basic/Grey 1*)
+ - The first line is set in *Caption/Bold*
+ - The second line is set in *Caption/Regular*
+- a "Show relations" button that displays all directly related work packages in a custom GANTT view in a new tab
+
+The mobile or single versions have these particularities:
+
+- hides the icon
+- retains only the first line of text, with a shorter text string (specified below)
+
+There are four possible variants:
+
+### Automatically scheduled (information)
+
+This is an information banner that is displayed if the work package is that are automatically scheduled. As such, the user cannot input dates (unless they first switch "Manual scheduling" on). This is typically the case for parent work packages, whose dates are derived from those of the earliest and latest children.
+
+> **Example**: Desktop and mobile banner: automatically scheduled.
+
+Text:
+
+> **Automatically scheduled. Dates are derived from relations.**
+> Click on “Show relations” for GANTT overview.
+
+Text (mobile or single versions):
+
+> **Automatically scheduled. Dates derived.**
+
+### Available dates limited by relations
+
+This is an information banner that informs the user that certain dates may not be available for selection (visible on the Mini calendar below) due to existing relations. For example, a work package generally cannot start before the finish date of the preceding one.
+
+> **Example**: Desktop and mobile banner: dates limited by relation.
+
+Text:
+
+> **Available start date and finish dates are limited by relations.**
+> Click on “Show relations” for GANTT overview.
+
+Text (mobile or single versions):
+
+> **Available dates limited by relations.**
+
+### Manual scheduling
+
+This is a warning banner reminds the user that manual scheduling has been switched on for this work package, and that any existing relations will therefore for ignored for scheduling purposes. All constraints will be ignored, allowing the user to manually pick any date unconstrained by relations.
+
+Note, however, that manual scheduling does not affect non-working days. If "Working days only" is switched on, non-working days remain unavailable.
+
+> **Example**: Desktop and mobile banner: manual scheduling.
+
+Text:
+
+> **Manual scheduling enabled, all relations ignored.**
+> Click on “Show relations” for GANTT overview.
+
+Text (mobile or single versions):
+
+> **Manual scheduling, relations ignored.**
+
+### Dates will affect related work packages
+
+This is a warning banner that informs users that changing the dates of the current work package will affect dates of other related work packages. It might for example push the following work package into the future.
+
+> **Example**: Desktop and mobile banner: date will affect related WPs.
+
+Text:
+
+> **Changing these dates will affect dates of related work packages.**
+> Click on “Show relations” for GANTT overview.
+
+Text (mobile or single versions):
+
+> **Changes will affect related work packages**.
+
+## Options bar
+
+The options bar consists of one or both of these selector fields:
+
+- Manual scheduling (switch, default: off)
+- Working days only (switch, default: on)
+
+> **Example**: Just the top of the date picker with both these options in their default state.
+
+## Input fields
+
+The input field group set applies only to Work package date pickers and can contain these form fields:
+
+> **Example**: The top part of the date picker with start date, end date and duration.
+
+### Start date
+
+Used to input the start date in ISO format (yyyy-mm-dd). Consists of:
+
+1. Label ("Start date", on top)
+2. Date input field
+3. Today link (that input's today's date)
+
+### Finish date
+
+Used to input the finish date in ISO format (yyyy-mm-dd). Consists of:
+
+- Label ("Finish date", on top)
+- Date input field
+- Today link (that input's today's date)
+
+### Duration
+
+- Label ("Duration", on top)
+- Duration input field that, on focus, turns into an integer field
+ - On blur, the word " days" is added at the end, with proper pluralisation
+
+Optionally, for milestones, there is only a single date field:
+
+### Date
+
+Used to input the date for single date pickers in ISO format (yyyy-mm-dd). Consists of:
+
+- Label ("Date", on top)
+- Date input field
+- Today link (that input's today's date)
+
+## Date picker variants: structure and options
+
+See sub-sections (todo: add internal Storybook links):
+
+- Work package date picker
+- Modal date picker
+- Basic date picker
diff --git a/frontend/src/stories/Datepicker-Modal.stories.mdx b/frontend/src/stories/Datepicker-Modal.stories.mdx
new file mode 100644
index 00000000000..b951248ea5d
--- /dev/null
+++ b/frontend/src/stories/Datepicker-Modal.stories.mdx
@@ -0,0 +1,58 @@
+import { Meta, Story, Canvas } from '@storybook/addon-docs';
+
+<Meta title="Patterns/Date Picker (3): Modal" />
+
+# Modal Date Picker
+
+They currently only exist in one variant:
+
+- *Single:* Currently used only when adding individual non-working days in the admin settings. The picker has an additional text field for the name of the non-working day.
+
+> **Example**: Modal work package single date picker (Add non-working day)
+
+It consists of:
+
+- Options (optional)
+ - This can be any selector field or form field required by the modal
+- Input field (single date field)
+- One mini calendar
+- Action bar
+
+The modal date picker does not have a range variant.
+
+## Mobile
+
+> **Example**: Mobile version of modal date picker
+
+The **mobile** version is exactly the same except:
+
+- The date picker, like all modals, is displayed full screen with a translucent grey background.
+- The action bar has only action (*Save*); the cancel button is hidden, and is replaced with a close floating close button *outside* at the bottom (centred), as is common to all modals in mobile
+
+
+## Margins and spacing
+
+1 rem between horizontal groupsets
+
+## Accessibility
+
+The date picker receives focus when it is launched and traps focus until the user either closes the modal (via Enter or Escape). These fields can receive keyboard focus:
+
+- Options
+- Input fields
+- Action bar
+
+The mini-calendar itself does not afford keyboard navigation (see see [Date Picker: Common elements](#) for accessibility shortcomings of of Flatpickr).
+
+_To be completed_
+
+## Usage
+
+This date picker is used in:
+
+- **Range:**
+
+ - Work package date field (all types except Milestone)
+- **Single:**
+
+ - Milestone date field
diff --git a/frontend/src/stories/Datepicker-WorkPackage.stories.mdx b/frontend/src/stories/Datepicker-WorkPackage.stories.mdx
new file mode 100644
index 00000000000..ee954d03a27
--- /dev/null
+++ b/frontend/src/stories/Datepicker-WorkPackage.stories.mdx
@@ -0,0 +1,74 @@
+import { Meta, Story, Canvas } from '@storybook/addon-docs';
+
+<Meta title="Patterns/Date Picker (4): Work Package" />
+
+# Work Package Date Picker
+
+There are two sub-variants:
+
+- *Range:* This is the most complex variety, with info banners, start and end dates, duration, option switches, and two mini calendars visible.
+- *Single:* Only a single date field, option switches, single mini calendar. Used only for milestones.
+
+## Sub-variants
+### Range
+
+**Range** consists of:
+
+- Banner
+- Options bar
+- Input fields (start, finish and duration)
+- Two mini calendars
+- Action bar
+
+> **Example**: Work package range date picker with default settings
+
+### Single
+
+**Single** consists of:
+
+- Banner (single version)
+- Options bar
+- Input fields (single date field)
+- One mini calendar
+- Action bar
+
+> **Example**: Work package single date picker with default settings
+
+## Mobile
+
+- The date picker, like all modals, is displayed full screen with a translucent grey background
+- The mobile version of the banner is displayed for both *range* and *single* variants
+- For range input fields, *Start date* and *Finish date* are in one line and the Duration is a line by itself underneath.
+- The action bar has only action (*Save*); the cancel button is hidden, and is replaced with a close floating close button *outside* at the bottom (centred), as is common to all modals in mobile
+
+### Mobile Range
+
+> **Example**: Mobile version of the work package range date picker
+
+### Mobile Single
+
+> **Example**: Mobile version of the work package single date picker
+
+## Accessibility
+
+The date picker receives focus when it is launched and traps focus until the user either closes the modal (via Enter or Escape). These fields can receive keyboard focus:
+
+- Banner (with the 'Show relations' button)
+- Options
+- Input fields
+- Action bar
+
+The mini-calendar itself does not afford keyboard navigation (see see [Date Picker: Common elements](#) for accessibility shortcomings of of Flatpickr).
+
+_To be completed_
+
+
+## Margins and spacing
+
+1 rem between horizontal groupsets
+
+## Usage
+
+This date picker is used in:
+
+- Add non-working days *(Administration > Non-working days)*
diff --git a/frontend/src/stories/Focus.stories.mdx b/frontend/src/stories/Focus.stories.mdx
index 40e64216a44..224d8213416 100644
--- a/frontend/src/stories/Focus.stories.mdx
+++ b/frontend/src/stories/Focus.stories.mdx
@@ -5,9 +5,9 @@ import tokens from '../app/spot/styles/tokens/dist/tokens.json';
# Focus state
-Focus state in OpenProject is represented by a 2-pixel outline around the focused element.
+Focus state in OpenProject is represented by a 2-pixel outline with colour _Indication/Focus_ around the focused element.
> Example of some elements with the focus state simulated
-_Active_ is a similar state as focused, but not entirely the same. For example, in the date picker, the start date can be "active" (meaning that clicking on a date in the mini-calendar will change the start date) but not in focus (because the mouse has clicked outside of the field).
+**Note**: _Active_ is a similar state as focused, but not entirely the same. For example, in the date picker, the start date can be "active" (meaning that clicking on a date in the mini-calendar will change the start date) but not in focus (because the mouse pointer has clicked outside of the field and the focus is technically outside the field).