No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:

  1. Missing Context/Providers: You can use decorators to supply specific contexts or providers, which are sometimes necessary for components to render correctly. For detailed instructions on using decorators, please visit the Decorators documentation.
  2. Misconfigured Webpack or Vite: Verify that Storybook picks up all necessary settings for loaders, plugins, and other relevant parameters. You can find step-by-step guides for configuring Webpack or Vite with Storybook.
  3. Missing Environment Variables: Your Storybook may require specific environment variables to function as intended. You can set up custom environment variables as outlined in the Environment Variables documentation.

Date label

import "@inera/ids-core/components/date-label/register";

<ids-date-label> requires either a stringified date object or a manually supplied month, day and year.

NameDescriptionDefaultControl
date label
date
Sets the date.
""
-
monthlabel
Manually set the month label. This does not replace the month property but should rather be used together when applying date manually.
""
year
Manually set year. Should be combined with month and day.
""
month
Manually set month. Should be combined with year and day.
""
day
Manually set day. Should be combined with month and year.
""

With date

A stringified Date object can be supplied to the date property: date="${new Date().toString()}"

Manually set date

It's also possible to select the month, day and year manually. Note that the properties are handled as numbers. Supplying a prefixed 0 like day="08" is therefore unnecessary. Although, a full year should be supplied.

Language support

There's no support for languages in the component itself. However you may set the month text to whichever text you want. Just use the monthlabel.

Note that the monthlabel does NOT replace month. Use them both to ensure screen reader compatibility (like the example below).

Accessibility

The monthlabel does NOT replace month. Use them both to ensure screen reader compatibility (like the example below).