isackrubio / gwt-cal

Automatically exported from code.google.com/p/gwt-cal
0 stars 0 forks source link

Click time block to create new appointment #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Description of the new feature:
1) Create a new event handler for when a user clicks a time block. Get the Date 
/ 
time for the clicked time block and provide as part of event args. 
2) Allow developer to set click behavior in CalendarSettings, such as single 
vs. 
double click

Use Case:
User clicks a time block with the intent of creating a new appointment

calendar.addTimeBlockClickHandler(){
  public void onCreate(TimeBlockClickEvent<Date> event) {
      event.getStartDate() ..... 
      .....
  }
};

Original issue reported on code.google.com by Brad.Ryd...@gmail.com on 26 Jul 2009 at 6:05

GoogleCodeExporter commented 9 years ago
Added to trunk in [http://code.google.com/p/gwt-cal/source/detail?r=65 r65].

Example code:
dayView.addTimeBlockClickHandler(new TimeBlockClickHandler<Date>(){
        @Override
        public void onTimeBlockClick(TimeBlockClickEvent<Date> event) {
                Date startDate = event.getTarget();
                ... create new appointment, add to dayView ...
        }
});

This event does not automatically create a new appointment, but gives the 
developer a 
way to handle the event and create an appointment however they see fit.

Original comment by Brad.Ryd...@gmail.com on 27 Jul 2009 at 1:07

GoogleCodeExporter commented 9 years ago

Original comment by Brad.Ryd...@gmail.com on 29 Oct 2009 at 3:55