Skip to content

Commit

Permalink
readme improved
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermeasn committed Nov 26, 2023
1 parent 7c45d98 commit 2bd7bef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ export function InputMask() {
// When filling out the mask is completed a test function
// is applied to check whether a valid date was entered,
// the result is received by the 'passing' key

const maskTest = (result) => !isNaN(Date.parse(result));

const maskComplete = useCompleteMask(presets.DATE_STAMP, result => !isNaN(Date.parse(result)));
const maskComplete = useCompleteMask(presets.DATE_STAMP, maskTest);
const [ data, setData ] = useState(maskComplete(''));

return (
Expand Down

0 comments on commit 2bd7bef

Please sign in to comment.