Hi @khellaf_,
Do you want to book during a date range?
Could you please tell me if you have a form to submit the form?
If you want to book during a date range and check if there is available slot using a form, you could validate the booking conflict by setting the submit button OnSelect as below:
If(!IsBlank(LookUp(ReservationRoom,
(DebutDate<= DatePicker4.SelectedDate && FinDate> DatePicker4.SelectedDate) ||
(DebutDate< DatePicker5.SelectedDate && FinDate>= DatePicker5.SelectedDate) ||
(DebutDate< DatePicker4.SelectedDate && FinDate> DatePicker5.SelectedDate))),Notify("Not available for booking!",Error),SubmitForm(Form1))
DatePicker4 represents the DatetimeStart date picker and DatePicker5 represents the DatetimeEnd date picker. If you have the time picker, you should modify as below:
HourDropdown:
Items property (24 hours):
["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]
MinutesDropdown:
Items property:
["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"]
Together with the DatePicker control, within one DataCard, then use the following formula to combine the time value with the date value under the Update property of the DataCard control:
DateValue1.SelectedDate + Time(Value(HourDropdown.Selected.Value), Value(MinutesDropdown.Selected.Value), 0)
You just need to replace DatePicker4 with the above time format and so does the DatePicker5