/
Hours-Minutes
Hours-Minutes
Description
An two input box that lets the user type in the time on either 12hr or24hr format.
System Dependencies
Installation
The package can be installed via npm:
npm install empower-inputs --save
Standard Hours-Minutes
Configuration
import { InputSelectionHandler} from 'empower-inputs';
let [formElement, setFormElement] = useState({
sampleHourMin: {
id: 'sampleHourMin',
type: 'hours-mins',
label: "Sample HourMin",
value: '',
placeholder: '-',
readOnly: false,
required: true,
disabled: false,
maxHours: '23',
maxMins: '59',
},
});
..............
return (
<>
<InputSelectionHandler
config={formElement.sampleHourMin}
onChanged={(e: any) => inputChangedHandler(e, 'sampleHourMin')}
/>
</>
)
Properties
Parent Parameter | Sub Parameter | Data Type | Constraint |
---|---|---|---|
config |
| JSON Object | Required |
| id | String | Required |
| type | String | Required |
| label | String | Optional |
| value | Array Object | Required |
| placeholder | String | Optional |
| readOnly | Boolean | Optional |
| disabled | Boolean | Optional |
| required | Boolean | Optional |
| maxHours | String | Required |
| maxMins | String | Required |
customClass |
| String | Optional |
onChanged |
| Event Method | Required |
References
Repository Link: https://bitbucket.org/empowerteams/empower-inputs
NPM Package: npm: empower-inputs
Demo Repo: git@bitbucket.org:empowerteams/mfe-sub-application-template.git
, multiple selections available,