Miss any of our Open RFC calls?Watch the recordings here! »

react-simple-form-gem

1.0.3 • Public • Published

react-simple-form-gem

react component compatible with simple_form gem

DateTime

import React from 'react';
import { DateTimeInput } from 'react-simple-form-gem';
 
// or import SimpleForm from 'react-simple-form'
// and use like <SimpleForm.DateTimeInput />
 
class BookRevisionList extends React.Component {
  render() {
    return (
      <div>
        <FormGroup>
          <Label>name</Label>
          <input type="text" name="book[revisions_attributes[0][name]" />
        </FormGroup>
        <FormGroup>
          <Label>released_at</Label>
          <DateTimeInput datetime={new Date()}
                         name="released_at"
                         object="book[revisions_attributes][0]" />
        </FormGroup>
      </div>
    )
  }
}
 

Install

npm i react-simple-form-gem

DownloadsWeekly Downloads

4

Version

1.0.3

License

MIT

Last publish

Collaborators

  • avatar