Skip to content

Commit

Permalink
Merge pull request #53 from indec-it/fix/locale
Browse files Browse the repository at this point in the history
fix(datepicker): fix locale
  • Loading branch information
maximilianoforlenza authored Oct 9, 2019
2 parents 2db2024 + e0a84ca commit 7686394
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 4 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"babel-preset-react-app": "^9.0.0",
"babel-preset-react-native": "^4.0.1",
"coveralls": "^3.0.4",
"date-fns": "^2.4.1",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"enzyme-to-json": "^3.3.5",
Expand Down
3 changes: 2 additions & 1 deletion src/components/DateField.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import {Label, FormGroup} from 'reactstrap';
import DatePicker from 'react-datepicker';
import es from 'date-fns/locale/es';

const handleChange = (date, onChange, currentValue, control) => {
if (currentValue === date) {
Expand All @@ -23,7 +24,7 @@ const DateField = ({
isClearable
key="es"
id={control}
locale="es"
locale={es}
{...{
maxDate,
minDate,
Expand Down

0 comments on commit 7686394

Please sign in to comment.