angular-moment-picker icon indicating copy to clipboard operation
angular-moment-picker copied to clipboard

Ignore seconds?

Open karthikrock opened this issue 8 years ago • 3 comments

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 ?

karthikrock avatar Sep 07 '17 23:09 karthikrock

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.

ChrisGarber-Medlever avatar Sep 21 '17 23:09 ChrisGarber-Medlever

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.

shubhamkumarnayak avatar Mar 24 '19 21:03 shubhamkumarnayak

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

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

uhrias avatar Aug 02 '19 05:08 uhrias