Sha256: 489bd72c593e2e651ca018c3978369e0f423dff19c2234d42dd4447ba393db08

Contents?: true

Size: 1.64 KB

Versions: 540

Compression:

Stored size: 1.64 KB

Contents

import React from 'react'
import { Date as FormattedDate, Caption, Title } from '../../'

const DateDefault = (props) => {
  return (
    <>
      <FormattedDate
          size="sm"
          value={new Date()}
          {...props}
      />

      <br />

      <div style={{display: "flex", columnGap: 4}}>
        <FormattedDate
            size="sm"
            value={"2012-08-03"}
            {...props}
        />
        <Caption>{"(Hyphenated Date)"}</Caption>
      </div>

      <br />

      <FormattedDate
          size="sm"
          value={new Date('03 Aug 2012')}
          {...props}
      />

      <br />

      <FormattedDate
          showDayOfWeek
          size="sm"
          value={new Date('03 Dec 2017')}
          {...props}
      />

      <br />
      <br />

      <FormattedDate
          value={new Date()}
          {...props}
      />

      <br />

      <div style={{display: "flex", columnGap: 4}}>
        <FormattedDate
            value={"2012-08-03"}
            {...props}
        />
        <Title
            size={4}
            text={"(Hyphenated Date)"}
        />
      </div>

      <br />

      <FormattedDate
          value={new Date('03 Aug 2012')}
          {...props}
      />

      <br />

      <FormattedDate
          showDayOfWeek
          value={new Date('03 Dec 2017')}
          {...props}
      />
    </>
  )
}

export default DateDefault

// *Development Note* -  We are reviewing this kit for a potential name change due to naming collisions when `new Date()` is used.
// To avoid this bug, please use name spacing as shown in the code examples. ie `import { Date as AliasedComponentName } from '../../'

Version data entries

540 entries across 540 versions & 2 rubygems

Version Path
playbook_ui-12.38.0.pre.alpha.PLAY966collapsiblenav41082 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui_docs-12.38.0.pre.alpha.PLAYaddingdatapropselectkit1080 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui-12.38.0.pre.alpha.PLAYaddingdatapropselectkit1080 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui_docs-12.37.0.pre.alpha.PLAY951collapsiblenav31078 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui-12.37.0.pre.alpha.PLAY951collapsiblenav31078 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui_docs-12.38.0.pre.alpha.playbook123801077 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui-12.38.0.pre.alpha.playbook123801077 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui_docs-12.37.0.pre.alpha.PLAY951collapsiblenav31074 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui-12.37.0.pre.alpha.PLAY951collapsiblenav31074 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui_docs-12.37.0.pre.alpha.PLAY951collapsiblenav31073 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui-12.37.0.pre.alpha.PLAY951collapsiblenav31073 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui_docs-12.37.0.pre.alpha.PLAYaddingdatapropselectkit1071 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui-12.37.0.pre.alpha.PLAYaddingdatapropselectkit1071 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui-12.38.0 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui_docs-12.36.0.pre.alpha.PLAY936momentjs1058 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui-12.36.0.pre.alpha.PLAY936momentjs1058 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui_docs-12.36.0.pre.alpha.PLAY936momentjs1050 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui-12.36.0.pre.alpha.PLAY936momentjs1050 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui_docs-12.36.0.pre.alpha.PLAY936momentjs1047 app/pb_kits/playbook/pb_date/docs/_date_default.jsx
playbook_ui-12.36.0.pre.alpha.PLAY936momentjs1047 app/pb_kits/playbook/pb_date/docs/_date_default.jsx