Use Scheduler just to pick a date

Hey guys,

I’ve been using your scheduler for some time now, and it is really amazing. Now I have a different challenge: I want to add an appointment in a normal form which has nothing to do with your scheduler. From there I want to have the user to pick a date for the appointment.

The request:
I want to open a new page (popup, div, page) where the scheduler is shown. There the user can check the current situation, scroll around months, weeks, and select a day and a time. This information should be taken back to the original form.

There should no appointment be regisered by the scheduler. It shall just return a date and a time for a possible appointment.

Is someone out there having done this?
Is there cetain mode of scheduler just to return a date?
Minical will not be enough, I’m afraid…

Thank you for any help or ideas!

Jens

A couple of things come to mind which you can try:

  1. Use the mini-calendar instead. It doesn’t give you a comprehensive detail of each day, but it does give you enough information to show which days have something booked on it.

  2. If you do decide with the full scheduler on a pop-up/separate div, you’ll have to basically “park” it on any day view you have. You then can use getState(), like:

scheduler.getState().date …that returns the active date (which, in this case, returns the date you’re parked on).

You can also probably use getState’s min_date or max_date, depending on how you wish to handle it.

These are just 2 approaches I can think of off the top my head. Hopefully this helps you out.

-jiminee

Oops, didn’t read that part where you mentioned Minical wasn’t enough. The second approach I suggested should work for you though.

Hi jiminee,

I think I just give the user the two possibilities. A minical to pick just the date and a popup div, which will return the state of the selection. I will put this state into the origin form and close the div.

Thank you, I’ll keep you informed if that one worked!

Jens

Hi all,

seems that getState() was not good enogh, because it just returns the information of the VIEW, not of the selected or newly entered event.

So I managed to get a DIV which loads the scheduler by ajax with a slightly modified Lightbox. This Lightbox does not save or display the selection, but just formats and returns it.
Then the event is deleted, the scheduler destroyed, and the DIV closed.

scheduler.showLightbox = function(id) {

            var ev = scheduler.getEvent(id); 
            start_F_Start_Date = fctKPMJs_convert_to_104(ev.start_date);                                
            start_F_Start_Hour = fctKPMJs_convert_to_104_nur_Stunde(ev.start_date);                
            start_F_Start_Minute = fctKPMJs_convert_to_104_nur_Minute(ev.start_date);
            
            document.getElementById(\"Datum_KK\").value = start_F_Start_Date;
                            
            if( (start_F_Start_Hour*1) < 10)   { start_F_Start_Hour    = '0' + (start_F_Start_Hour*1);}
            if( (start_F_Start_Minute*1) < 10) { start_F_Start_Minute  = '0' + (start_F_Start_Minute*1);}
            
            var duration = ev.end_date - ev.start_date;
            
            var duration_h = Math.floor(duration / 3600000);
            var duration_m = Math.floor(((duration / 3600000) - duration_h) * 60);
            
            document.getElementById(\"Stunde1_KK\").value = start_F_Start_Hour;
            document.getElementById(\"Minute1_KK\").value = start_F_Start_Minute;
            
            document.getElementById(\"Dauer_h_KK\").value = duration_h;
            document.getElementById(\"Dauer_min_KK\").value = duration_m;
            
            scheduler.deleteEvent(id);
            
            scheduler.destroyCalendar(scheduler);
            
            close_Popup_Window();
                        
        }