Skip to content
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

Option to disable selection of minutes #281

Closed
LoganDupont opened this issue Jan 13, 2020 · 3 comments
Closed

Option to disable selection of minutes #281

LoganDupont opened this issue Jan 13, 2020 · 3 comments

Comments

@LoganDupont
Copy link

I was wondering if there is an option where I can prevent users from switching to minutes modal. I tried to set hoursOnly="true" but this doesn't prevent the user from changing the minutes in the dial-container (header). I'm still able to navigate to the minutes modal by clicking on the minutes input field or by using my keyboard controls.

@Agranom
Copy link
Owner

Agranom commented Jan 13, 2020

Hi @LoganDupont ,
I will improve hoursOnly functionality and avoid switching to minutes

@satrent
Copy link

satrent commented Jan 16, 2020

I'm using this as a work-around for now....

<ngx-material-timepicker (opened)="disableMinutes()" hoursOnly="true">

public disableMinutes() {
    setTimeout(() => {
        let minutesControl  = document.getElementsByClassName('timepicker-dial__control')[1];

        if (minutesControl){
            minutesControl.setAttribute('disabled', 'true');
        }
    });
}

@Agranom
Copy link
Owner

Agranom commented Feb 29, 2020

The issue is resolved. Update to the latest version (v.5.4.0).

@Agranom Agranom closed this as completed Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants