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

Unable no set minTime if it's 00:00 #603

Open
Gvozdikova opened this issue Sep 26, 2022 · 4 comments
Open

Unable no set minTime if it's 00:00 #603

Gvozdikova opened this issue Sep 26, 2022 · 4 comments

Comments

@Gvozdikova
Copy link

I have a datepicker in mode "daytime" and i want to disable the ability for user to choose date and time later than the time they open the datepicker.
Datepicker is configured with this settings
datePickerFromConfig = {
format: "DD.MM.yyyy HH:mm",
locale: "uk-UA",
firstDayOfWeek: "mo",
disableKeypress: true,
monthBtnFormat: "MMMM",
min: undefined,
max: moment(),
maxTime: moment(),
minTime: moment().hour(0).minute(0),
showTwentyFourHours: true,
hours24Format: "HH",
displayDate: undefined
};

It looks like it handles only 00:00 time this way.
If i set minTime: moment().hour(1).minute(0), it works as expected

@vlio20
Copy link
Owner

vlio20 commented Sep 26, 2022

Hi, can you please share a stackblitz demo of your setup?

@Gvozdikova
Copy link
Author

Hi, can you please share a stackblitz demo of your setup?

https://prnt.sc/7tm3AuRlRW89

Stackblitz failed on installing the library(

My main problem is that picker allows to click down on button and if maxTime is, for example, 14:00, it allows you to click 13, 12, 11 ....2, 1 and then 0, 23, 22
Can i set datepicker maybe not to do this circle and just stop on 0?

@Gvozdikova
Copy link
Author

https://angular-selste.stackblitz.io
here is a stackblitz example

@vlio20
Copy link
Owner

vlio20 commented Oct 7, 2022

I will check it right after returning from my vacation (2 weeks)

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

2 participants