appointment-picker
appointment-picker copied to clipboard
Increase max interval for longer appointments
A viable scenario is that an appointment could last 2h, why the limit for 60min?
Hi Jannicz,
Can you please advise how to set startTime for example 08.30 etc... I mean with leading minutes. If you could provide a feedback asap as it is urgent. Thanks in advance.
Regards, Shehroze
@Shehroze-Nvision I guess your question has nothing to do with the issue in the title, right? What you asking is to be able to set a startTime that is not an integer? Currently all default values can only be integer <24 (what means that they have to be full hours). So the lib does not support it.
You could do a workaround by setting startTime
to 8 and adding the option disabled: ['8:00', '8:15']
so that times below 8:30 cannot be picket. You could then set the initial value of the text input field to <input type="text" value="8:30">
. Doing that, the field would have the starting value of 8:30 and the values below would be greyed out.
@jannicz Yes it has nothing to do with this issue. sorry i dont know how to get contact with you thats why i commented here.. Thanks alot for the reply.. i will try the workaround.
Hi @jannicz ,
I have tried the workaround but the values are not being displayed as greyed out but it is not selectable when clicked, the issue is that it is not displayed as greyed out.
I think it is a bug the top row is not shown as disabled when the values treated as disabled but when the values come to the second row it can be displayed as greyed out. Please view below screenshots and advise if can get a fix for this.
Thats interesting, indeed. But I see another difference between the configurations in the screenshots. In screenshot 1 the leadingZero
is true, in screenshot 2 it is false, am I right?
Assumption: if you set the disabled array for the configuration in 1 as disabled: ['08:00', '08:15']
it might work. Try.
Yes, you are right.
Even without leadingZero it is still the same issue, i think it is for sure a bug, a fix for this would be highly appreciated.
Please send me the picker configuration in screenshot 1 and I will have a look ;-)
timePicker(): void{ this.picker = new AppointmentPicker(this.input.nativeElement, { interval: this.intervalTime, startTime: '08', endTime: '17', disabled: ["08:00", "08:15", "08:30", "12:45", "13:00"], large: true, templateInner: '<li class="appo-picker-list-item" {{disabled}}><input type="button" tabindex="-1" value="{{time}}" {{disabled}}>', templateOuter: 'Pick Available Time
- {{innerHtml}}
When i inspected the picker, i can see the disabled attribute is not being assigned to the first row of the array. please have a look at the below screenshot:
@jannicz , Please can you provide a feedback on the above. Thanks
Yes, so your configuration has an error. startTime
and endTime
must be of type integer
(instead of e a string). Then it should work.
@jannicz ,
Yes i had to pass it as string because was getting the following errors. Maybe you could advise on this error below when passing integer : You may need an additional loader to handle the result of these loaders. | this.picker = new AppointmentPicker(this.input.nativeElement, { | interval: this.intervalTime,
startTime: 08,
| endTime: '17', | disabled: this.disabledTime,
Try passing 8
instead of 08
.
@jannicz
Yes that did the trick. Thanks alot for the support you provided. You are the best man. Keep it up !! 👍 💯 🥇
Thank you! Good luck with your project :-)