Hi,
I am using the client side double click event to show a custom appointment form.
How do i get the date-time on which user clicked in the month view, week view(dayview with visible days set to 7) and day view.
For month view (and old week view) i used the code snippet mentioned in this post http://blogs.infragistics.com/forums/t/41180.aspx, but this works only when user clicks on the header.
I am using the latest infragistics release (2011 volume 2)
Hello appoint,
I suggest using the ActiveDayUTC property of WebScheduleInfo. ActiveDayUTC represents the current and day.
For more information regarding this property, you may refer to the following documents:
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2011.2/CLR4.0/html/Infragistics4.WebUI.WebSchedule.v11.2~Infragistics.WebUI.WebSchedule.WebScheduleInfo~ActiveDayUtc.html
If you have any questions, please let me know as well.
Hi Vivian,
How do i get the ActiveDay value in the client side event (Javascript).
Also will ActiveDay return the correct date on which the user double clicked in case of month view and weekview (day view with visible days set to 7).
Hello apppoint,
I apologize for the delay. Below is a sample demonstrating how ActiveDay is changed :
http://samples.infragistics.com/aspnet/Samples/WebSchedule/Display/WebScheduleInfoProperties1/Default.aspx?cn=schedule&sid=5d49381e-9dc7-4ec6-b125-1375235497e9
Please let me know if this is the behavior you are looking for. If not, please let me know as well.
I am trying to get active day selection on webdayview and webmonthview controls. The link in your post points to a webcalendar view sample.
Please let me know if you have any questions.
WebScheduleInfo.getActiveDay() works fine in case of a webMonthView, in case of a webDayView the time part of the users selection is not captured by this api. Also if the number of visible days > 1 the api returns incorrect results.
Thank you for the update.
With the WebDayView, the ActiveDay is rendered as the first day of the collection of days. I have attached a sample using WebDayView.
Please let me know if this is the behavior you are seeing, or otherwise.
I may need more details on the time element you metioned.
Hello Venki,
There are a couple of ways to capture the time associated with a doubleclick. One is by using the HTML element of the WebDayView as each timeslot is a <td> with a unique "uie" referred to as "SLOT". You may access the timeslot through the elem argument's getAttribute("uie") in the DBLClick event. A "SLOT" corresponds to a timeslot defined by the time interval. For example if SLOT18 is 10:00 timeslot, SLOT19 is 10:30 timeslot with a 30-minute interval. If we take the slot # and multiply it by the time interval we will get the timeslot. With this approach you may use the following code:
function schedulerDblClick(oSchedulerView, evt, elem) { debugger; evt.cancel = true; var uie = elem ? elem.getAttribute('uie') : null; var oScheduleInfo = ig_getWebScheduleInfoById('<%= WebScheduleInfo1.ClientID %>'); if (!uie || !(uie.indexOf('SLOT') != 0 || uie.indexOf('LABL') != 0)) return; var i = parseInt(uie.substring(4)); //alert('time:' + i * oDayView.getTimeSlotInterval() + ' minutes'); var time = i * oSchedulerView.getTimeSlotInterval(); var activeDay = oScheduleInfo.getActiveDay(); alert(time); }
For more details, please refer to the following forum thread:
http://blogs.infragistics.com/forums/t/35680.aspx
You may also use the WebScheduleInfo's ActivityDialogOpening clientside event. This event is triggered by a doubleclick. You may also set the ActiveDay to the date and time returned by getStartDateTime().
function WebScheduleInfo1_ActivityDialogOpening(oScheduleInfo, oEvent, oDialog, oActivity) { //Add code to handle your event here. debugger; oEvent.cancel = true; var start = oActivity.getStartDateTime(); var key = oActivity.getDataKey(); alert(start); // window.showModalDialog("Default2.aspx?StartTime=" + start); }
I hope this helps. Sincerely,VivianDeveloper Support EngineerInfragisticswww.infragistics.com/support
All i need to do is capture the datetime slot on which the user double clicked in the client event on the scheduler irrespective of whether i am using a WebMonthView or a WebDayView.
I am uploading a sample of the same.
When i double click anywhere on the WebMonthView ScheduleInfo.getActiveDay(); returns the selected date as expected.
But In case of a WebDayView the value returned does not have the correct time info (For Ex - Wed Feb 15 00:00:00 UTC+0530 2012 - no matter on what time-slot i double click it always show time as 00:00:00 ) and when the number of visible days is greater than 1 it always returns first day as activeday.
Hope this explains my requirement. Please let me know if you need any further clarifications