pwt.datepicker icon indicating copy to clipboard operation
pwt.datepicker copied to clipboard

Set second to 0 when it's disabled

Open mokhosh opened this issue 5 years ago • 0 comments

Expected Behavior

When we disable second in timePicker it means we don't want that data. So it's reasonable to set seconds to 0 when it's disabled.

Current Behavior

Currently we get datetimes like this:

1398-06-25 08:34:46
1398-06-25 08:35:46
1398-06-25 08:36:46

not pretty, right? This might break things and create unintended bugs when we expect times to be rounded to minutes too.

Steps to Reproduce (for bugs)

const options = {
    "timePicker": {
        "enabled": true,
        "second": {
            "enabled": false
        }
    }
}

mokhosh avatar Sep 16 '19 04:09 mokhosh