How to use the @commercetools-uikit/calendar-utils.getExampleDateStrings function in @commercetools-uikit/calendar-utils

To help you get started, we’ve selected a few @commercetools-uikit/calendar-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github commercetools / ui-kit / src / components / inputs / date-input / date-input.story.js View on Github external
import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs, select, boolean, text } from '@storybook/addon-knobs/react';
import { action } from '@storybook/addon-actions';
import { getExampleDateStrings } from '@commercetools-uikit/calendar-utils';
import { Value } from 'react-value';
import Readme from './README.md';
import DateInput from './date-input';
import Section from '../../../../.storybook/decorators/section';

const exampleDates = getExampleDateStrings();

storiesOf('Components|Inputs', module)
  .addDecorator(withKnobs)
  .addParameters({
    readme: {
      // Show readme at the addons panel
      sidebar: Readme,
    },
  })
  .add('DateInput', () => (
    <section>
       {
          const placeholder = text('placeholder', 'Placeholder');
          return (</section>
github commercetools / ui-kit / src / components / fields / date-field / date-field.story.js View on Github external
import { action } from '@storybook/addon-actions';
import { Value } from 'react-value';
import {
  withKnobs,
  boolean,
  text,
  select,
  object,
} from '@storybook/addon-knobs/react';
import { getExampleDateStrings } from '@commercetools-uikit/calendar-utils';
import Section from '../../../../.storybook/decorators/section';
import Readme from './README.md';
import * as icons from '../../icons';
import DateField from './date-field';

const exampleDates = getExampleDateStrings();

storiesOf('Components|Fields', module)
  .addDecorator(withKnobs)
  .addParameters({
    readme: {
      // Show readme at the addons panel
      sidebar: Readme,
    },
  })
  .add('DateField', () =&gt; (
    <section>
       {
          const name = text('name', '');
          const hint = text('hint', 'Select the date of publication');</section>