vazco / uniforms

A React library for building forms from any schema.
https://uniforms.tools
MIT License
1.94k stars 239 forks source link

How to remove the time in data-time field? I only want date. #1293

Closed isaacdarcilla closed 10 months ago

isaacdarcilla commented 10 months ago

How to remove the time in data-time field? I only want date.

{"type":"object","title":"Guest","properties":{"name":{"type":"string","label":"Name","placeholder":"My new field"},"newField108":{"type":"string","label":"New Field 108","placeholder":"My new field test","options":[{"id":1698211054322,"label":"Option 1","value":"option-1"},{"id":1698211055409,"label":"Option 2","value":"option-2"},{"id":1698211055745,"label":"Option 3","value":"option-3"}]},"newField293":{"label":"New Field 293","placeholder":"My new field","format":"date-time"}},"required":["name","newField108","newField293"]}

image

Originally posted by @isaacdarcilla in https://github.com/vazco/uniforms/discussions/1291

kestarumper commented 10 months ago

Hi @isaacdarcilla, You can use the uniforms: { type: 'date' } keyword to pass additional props to the date field component.

Have a look at the playground example.

isaacdarcilla commented 10 months ago

Thanks @kestarumper