-
-
- ) => {
- const value = Math.max(0, parseInt(e.target.value) || 0);
- setVotingPeriod(prev => ({ ...prev, days: value }));
- setFieldValue('votingPeriod.days', value);
- }}
- min={0}
- />
- ) => {
- const value = Math.max(0, parseInt(e.target.value) || 0);
- setVotingPeriod(prev => ({ ...prev, hours: value }));
- setFieldValue('votingPeriod.hours', value);
- }}
- min={0}
- />
- ) => {
- const value = Math.max(0, parseInt(e.target.value) || 0);
- setVotingPeriod(prev => ({ ...prev, minutes: value }));
- setFieldValue('votingPeriod.minutes', value);
- }}
- min={0}
- />
- ) => {
- const value = Math.max(0, parseInt(e.target.value) || 0);
- setVotingPeriod(prev => ({ ...prev, seconds: value }));
- setFieldValue('votingPeriod.seconds', value);
- }}
- min={0}
- />
-
- {/* Display validation error below the voting period inputs */}
- {errors.votingPeriod && typeof errors.votingPeriod === 'string' && (
-
{errors.votingPeriod}
- )}
-
-
-