Skip to content

feat(#255): Datetime picker doesn't have seconds option #417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

UseMuse
Copy link

@UseMuse UseMuse commented Apr 26, 2025

#255

added withSeconds option to mtx-calendar and mtx-datetimepicker with default value false (to keep the old behavior for users with the update)

    <!--withSeconds default value - false -->
    <mtx-datetimepicker [withSeconds]="true"...></mtx-datetimepicker>
    <mtx-calendar [withSeconds]="true"...></mtx-calendar>

for MTX_DATETIME_FORMATS added:
for parse and display:
timeWithSecondsInput and datetimeWithSecondsInput

when the user turns on the withSeconds flag
the formatting will be taken from there, if the timeWithSecondsInput and datetimeWithSecondsInput formats are not filled in, the timeInput and datetimeInput formats will be taken and a warning will be displayed in the console that the formats are not filled.
The withSeconds flag is relevant only for the datetime or time type
when enabling the withSeconds flag for other types, the withSeconds flag will be automatically reset to false with a warning in the console

 providers: [
    {
      provide: MTX_DATETIME_FORMATS,
      useValue: {
        parse: {
          dateInput: 'YYYY-MM-DD',
          monthInput: 'MMMM',
          yearInput: 'YYYY',
          timeInput: 'HH:mm',
          timeWithSecondsInput: 'HH:mm:ss',//not required to fill
          datetimeInput: 'YYYY-MM-DD HH:mm',
          datetimeWithSecondsInput: 'YYYY-MM-DD HH:mm:ss',//not required to fill
        },
        display: {
          dateInput: 'YYYY-MM-DD',
          monthInput: 'MMMM',
          yearInput: 'YYYY',
          timeInput: 'HH:mm',
          timeWithSecondsInput: 'HH:mm:ss',//not required to fill
          datetimeInput: 'YYYY-MM-DD HH:mm',
          datetimeWithSecondsInput: 'YYYY-MM-DD HH:mm:ss',//not required to fill
          monthYearLabel: 'YYYY MMMM',
          dateA11yLabel: 'LL',
          monthYearA11yLabel: 'MMMM YYYY',
          popupHeaderDateLabel: 'MMM DD, ddd',
        },
      },
    },

please accept the contribution, since the work has already been done, and I saw the message that the contribution to v15 is not accepted when I finished the work

record.2025-04-26.220513.mp4

@UseMuse UseMuse changed the title done feat(https://github.com/ng-matero/extensions/issues/255): Datetime picker doesn't have seconds option #416 Apr 26, 2025
@UseMuse UseMuse changed the title feat(https://github.com/ng-matero/extensions/issues/255): Datetime picker doesn't have seconds option #416 feat(#255): Datetime picker doesn't have seconds option #416 Apr 26, 2025
@UseMuse UseMuse changed the title feat(#255): Datetime picker doesn't have seconds option #416 feat(#255): Datetime picker doesn't have seconds option Apr 26, 2025
@nzbin nzbin added the invalid This doesn't seem right label Apr 27, 2025
@UseMuse UseMuse closed this Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants