Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am trying to say that I use the Date module to keep appointments for a doctor.
When he selects a date, and start and end hours, is there a way, so if he already has entered an appointment for that time, to be informed that he cannot add a new date for that period??
Comments
Comment #1
KarenS CreditAttribution: KarenS commentedI have not used any of these and have no idea if/how they work, but you could investigate:
http://drupal.org/project/resource_conflict
http://drupal.org/project/availability_calendars
http://drupal.org/project/bookingsapi/
http://drupal.org/project/publicbookings
http://drupal.org/project/eventbookings
Since there are other modules that are trying to provide this kind of functionality, it's probably a low priority to add it directly to Date. But I'll leave this open as a feature request because this comes up all the time and perhaps there would be a reason to revisit this.
Comment #2
tsikos CreditAttribution: tsikos commentedThank you, but nothing of them seems to be the solution I'm searching...
:(
Comment #3
llepere CreditAttribution: llepere commentedNone of these seem like they would work along with the Calendar module. Instead they seem to be alternatives to it. Am I missing something?
I thought it might not be too difficult to have an alert message displayed when an event overlaps an existing one since there is logic in place to handle a different display in that case. I apologize if I'm ignorant of the complexity.
Comment #4
bszk CreditAttribution: bszk commentedI would like to add my voice to being able to avoid a conflict in a calendar because I had started to develop an item booking calendar with the Calendar + Date modules and then discovered that there seems to be no way to avoid two users booking the same item at the same time.
Can we reject the SAVE if there is an existing conflict?
Comment #5
bszk CreditAttribution: bszk commentedSince someone has emailed me about how to avoid a conflict I would like to share my solution. I ended up writing a module ( my first one )
The function below works on a node type called "booking"
and uses form_set_error if the booking node being saved is bad
a) Because the length of the booking is > some limit
b) The length of time specified is less than some limit ( fixed at 30 minutes )
c) There is a booking conflict with one that already exists.
There is another type called "bookable_item" which has the max limit it. As I write this I suppose I could have another field for the minimum.
If any one sees a bug in my function or sees some way to be more efficient or better code I would appreciate the comments.
Bill