Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

iamsimakov/ra-datetime-input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ra-datetime-input

Unofficial DateTimeInput component for react-admin.

Component was updated from aor-datetime-input and versioning now started from v1.9.0 New package https://www.npmjs.com/package/ra-datetime-input

Component will work in two steps:

  1. Select date

date

  1. Select time

time

Just try it!

Installation

npm install ra-datetime-input --save

Usage

import React from 'react';
import {
    Edit,
    TextInput,
    LongTextInput,
    TabbedForm,
    FormTab,
} from 'react-admin'
import DateTimeInput from 'ra-datetime-input';

export const NewsEdit = (props) => (
  <Edit title={<NewsTitle />} {...props}>
    <TabbedForm>
      <FormTab>
        <LongTextInput source="title" validate={required} />
        <DateTimeInput source="publish_date" validate={required} />
      </FormTab>
    </TabbedForm>
  </Edit>
);

Development

You can build sources:

npm run build

License

This library is licensed under the MIT Licence.

Copyright (c) 2019 iamsimakov.