Files
.github
cypress
dev-test
img
packages
scripts
website
content
blog
docs
widgets
boolean.md
date.md
datetime.md
file.md
hidden.md
image.md
list.md
map.md
markdown.md
number.md
object.md
relation.md
select.md
string.md
text.md
add-to-your-site.md
architecture.md
authentication-backends.md
beta-features.md
cloudinary.md
collection-types.md
configuration-options.md
contributor-guide.md
custom-widgets.md
customization.md
deploy-preview-links.md
examples.md
gatsby.md
intro.md
netlify-large-media.md
start-with-a-template.md
update-the-cms-version.md
uploadcare.md
widgets.md
pages
.keep
data
src
static
.babelrc
.gitignore
.nvmrc
.stylelintrc
README.md
gatsby-browser.js
gatsby-config.js
gatsby-node.js
package.json
postcss.config.js
yarn.lock
.all-contributorsrc
.editorconfig
.eslintrc
.gitignore
.nvmrc
.prettierignore
.prettierrc
.stylelintrc
.travis.yml
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
babel.config.js
custom-preprocessor.js
cypress.json
jest.config.js
lerna.json
package.json
renovate.json
setupTestFramework.js
yarn.lock
static-cms/website/content/docs/widgets/date.md
2018-11-21 20:13:32 -05:00

1.0 KiB

title label
date Date

The date widget translates a date picker input to a date string. For saving date and time together, use the datetime widget.

  • Name: date
  • UI: date picker
  • Data type: Moment.js-formatted date string
  • Options:
    • default: accepts a date string, or an empty string to accept blank input; otherwise defaults to current date
    • format: optional; accepts Moment.js tokens; defaults to raw Date object (if supported by output format)
    • dateFormat: optional; boolean or Moment.js tokens. If true use default locale format.
    • timeFormat: optional; boolean or Moment.js tokens. If true use default locale format, false hides time-picker. Defaults to false.
  • Example:
    - label: "Birthdate"
      name: "birthdate"
      widget: "date"
      default: ""
      format: "MMM Do YY"