Comments (4)
Did you actually pick a time, or just click OK? If the latter, it's a MUI bug.
The same code for FormsyTime is here: https://github.com/mbrookes/formsy-mui-demo/blob/master/Form.jsx
Hand can be seen working at the site linked from the README in that Repo.
from formsy-material-ui.
I actually pick the time and then click ok
I am using the new Meteor beta
Same class as in Form.jsx
import React from 'react'
import * as rb from 'react-bootstrap'
import injectTapEventPlugin from 'react-tap-event-plugin';
import { FormsyCheckbox, FormsyDate, FormsyRadio, FormsyRadioGroup, FormsySelect, FormsyText, FormsyTime, FormsyToggle } from 'formsy-material-ui'
import RaisedButton from 'material-ui/lib/raised-button'
import MenuItem from 'material-ui/lib/menus/menu-item'
import TimePicker from 'material-ui/lib/time-picker'
import Paper from 'material-ui/lib/paper'
import Styles from 'material-ui/lib/styles'
injectTapEventPlugin();
export default React.createClass({
childContextTypes: {
muiTheme: React.PropTypes.object
},
getChildContext(){
return {
muiTheme: Styles.ThemeManager.getMuiTheme(Styles.LightRawTheme)
}
},
getInitialState() {
return {
canSumbit: false
};
},
errorMessages: {
wordsError: "Please only use letters",
numericError: "Please provide a number",
urlError: "Please provide a valid URL"
},
styles: {
paperStyle: {
width: 300,
margin: 'auto',
padding: 20
},
switchStyle: {
marginBottom:16
},
submitStyle: {
marginTop: 32
}
},
enableButton() {
this.setState({
canSubmit: true
});
},
disableButton() {
this.setState({
canSubmit: false
});
},
submitForm(data) {
alert(JSON.stringify(data, null, 4));
},
notifyFormError(data) {
console.error('Form error:', data);
},
render() {
let {paperStyle, switchStyle, submitStyle } = this.styles;
let { wordsError, numericError, urlError } = this.errorMessages;
return (
<Paper style={paperStyle}>
<Formsy.Form
onValid={this.enableButton}
onInvalid={this.disableButton}
onValidSubmit={this.submitForm}
onInvalidSubmit={this.notifyFormError}
>
<FormsyText
name="name"
validations="isWords"
validationError={wordsError}
required
hintText="What is your name?"
floatingLabelText="Name"
/>
<FormsyText
name="age"
validations="isNumeric"
validationError={numericError}
hintText="Are you a wrinkly?"
floatingLabelText="Age (optional)"
/>
<FormsyText
name="url"
validations="isUrl"
validationError={urlError}
required
defaultValue="http://"
hintText="http://www.example.com"
floatingLabelText="URL"
/>
<FormsySelect
name="frequency"
required
floatingLabelText="How often do you?"
menuItems={this.selectFieldItems}
>
<MenuItem value={'never'} primaryText="Never" />
<MenuItem value={'nightly'} primaryText="Every Night" />
<MenuItem value={'weeknights'} primaryText="Weeknights" />
</FormsySelect>
<FormsyDate
name="date"
required
floatingLabelText="Date"
/>
<FormsyTime
name="time"
required
floatingLabelText="Time"
/>
<FormsyCheckbox
name="agree"
label="Do you agree to disagree?"
style={switchStyle}
/>
<FormsyToggle
name="toggle"
label="Toggle"
style={switchStyle}
/>
<FormsyRadioGroup name="shipSpeed" defaultSelected="not_light">
<FormsyRadio
value="light"
label="prepare for light speed"
style={switchStyle}
/>
<FormsyRadio
value="not_light"
label="light speed too slow"
style={switchStyle}
/>
<FormsyRadio
value="ludicrous"
label="go to ludicrous speed"
style={switchStyle}
disabled={true}
/>
</FormsyRadioGroup>
<RaisedButton
style={submitStyle}
type="submit"
label="Submit"
disabled={!this.state.canSubmit}
/>
</Formsy.Form>
</Paper>
);
}
});
from formsy-material-ui.
Hi @lishine - I can't reproduce this with the current version. Is this still an issue?
from formsy-material-ui.
Closing due to no response.
from formsy-material-ui.
Related Issues (20)
- Is there a component for file upload? HOT 1
- FormsySelect onChange getting bypassed HOT 3
- Support the incoming Material UI v1.0 HOT 10
- Text field underline color broken after 0.6.1 HOT 10
- FormsyText with type="number" bad behavior HOT 3
- FormsyAutoComplete does not use provided default value HOT 2
- FormsySelect required is not showing any error when submit the form HOT 9
- Remove FormsyAutoComplete component? HOT 1
- Warning: getDefaultProps
- FormsySelect does not change underline color when selected HOT 1
- Not working with React 16.1.1 HOT 1
- Support new Formsy
- Incorrect directory HOT 6
- Support formsy-react v1.1.2 HOT 4
- FormsyDate and FormsyTime don't handle value argument properly
- FormsyText cannot accept value 0
- Not compatible HOT 1
- not compatible with React 16.3.1 HOT 1
- Accept a list of validation errors?
- Is This Project Maintained? HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from formsy-material-ui.