mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 15:36:02 +01:00
refactor(web/input): set date to current if default is set to true
This commit is contained in:
@@ -59,8 +59,11 @@ const InputDialog: React.FC = () => {
|
||||
{
|
||||
value:
|
||||
row.type !== 'checkbox'
|
||||
? row.type === 'date' && row.default
|
||||
? new Date(row.default)
|
||||
? row.type === 'date'
|
||||
? // Set date to current one if default is set to true
|
||||
row.default === true
|
||||
? new Date()
|
||||
: row.default && new Date(row.default)
|
||||
: row.default
|
||||
: row.checked,
|
||||
} || { value: null }
|
||||
|
||||
Reference in New Issue
Block a user