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

Ignore seconds? #212

Open
karthikrock opened this issue Sep 7, 2017 · 3 comments
Open

Ignore seconds? #212

karthikrock opened this issue Sep 7, 2017 · 3 comments

Comments

@karthikrock
Copy link

karthikrock commented Sep 7, 2017

Is there a way to completely ignore seconds (Minute view) ? I tried setting below:

    momentPickerProvider.options({
        secondsStep:   60
    });

still it shows the Minute view to select the only available option for seconds there which is "00" (top of the minute). Is there a way to only select the date and time with hours and minutes ?

@ChrisGarber-Medlever
Copy link

Yup, check out the builder: http://indrimuska.github.io/angular-moment-picker/#builder

You're looking for the max-view property. If add max-view="hour" to your picker or your defaults, this should give you the behavior you're looking for. Check out the documentation for more features.

@shubhamkumarnayak
Copy link

shubhamkumarnayak commented Mar 24, 2019

Yup, check out the builder: http://indrimuska.github.io/angular-moment-picker/#builder

You're looking for the max-view property. If add max-view="hour" to your picker or your defaults, this should give you the behavior you're looking for. Check out the documentation for more features.

Sorry, not working, I set the max-view to minutes but still it is showing the current minutes and seconds in the input after selection.

@uhrias
Copy link

uhrias commented Aug 2, 2019

Should be enough to set max-view="hour" and handle change event like this

$scope.trimSeconds = function(momentTime){
momentTime._d.setSeconds(0);
}

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

4 participants