ngx-mat-datetime-picker icon indicating copy to clipboard operation
ngx-mat-datetime-picker copied to clipboard

Disable Seconds on input

Open Luizgpp opened this issue 4 years ago • 7 comments

Hello everyone, i want to display only 19:20 instead 19:20:44. I don't need to display seconds for the users.

If its possible can help me? Thanks

Luizgpp avatar Feb 26 '21 18:02 Luizgpp

Just check tutorial/ examples: https://h2qutc.github.io/angular-material-components/datetimepicker image

klimtron avatar Mar 02 '21 23:03 klimtron

any update on this? How to hide seconds when date is selected on input field?

Ilijan91 avatar Jan 24 '22 12:01 Ilijan91

Same here...

micobarac avatar Apr 04 '22 07:04 micobarac

I solve this in template by using [value]="date.value" and in .ts file use 'date-fns' to format date only to hours

Ilijan91 avatar Apr 04 '22 08:04 Ilijan91

Would be nice to hide seconds in the input field in case they are hidden in the "callendar view".

Frimlik avatar Oct 27 '23 11:10 Frimlik

@Ilijan91 can you show your solution? I'm trying but failing

ninomirabile avatar Feb 07 '24 16:02 ninomirabile

[value]="toDate.value" on input and use date-fns library [https://date-fns.org/ ] to format value of date how do you need to show

Ilijan91 avatar Feb 07 '24 18:02 Ilijan91