Skip to content

Commit

Permalink
fix date format in react-native/expo
Browse files Browse the repository at this point in the history
  • Loading branch information
sheppard committed Oct 22, 2021
1 parent 550801a commit 6639972
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/material/src/inputs/DateTime.native.js
Expand Up @@ -7,9 +7,9 @@ import PropTypes from 'prop-types';
import { format, parse } from './date-utils';

const displayFormat = {
date: value => value.toLocaleDateString(),
time: value => value.toLocaleTimeString(),
datetime: value => value.toLocaleString()
date: value => parse.date(value).toLocaleDateString(),
time: value => parse.time(value).toLocaleTimeString(),
datetime: value => parse.datetime(value).toLocaleString()
};

export default function DateTime({ name, type, label }) {
Expand Down

0 comments on commit 6639972

Please sign in to comment.