I think I've found bug when cutomized Advanced Template is used.
Scenario:
EDIT: I'm using Q3 beta. There is one more thing. When I enter edit form for this evenI I see that end date is selected +1day so if I just save (without changing anything) then this event will be longer (+1day).
Scenario:
- Go here http://demos.telerik.com/aspnet-ajax-beta/Scheduler/Examples/AdvancedFormTemplate/DefaultCS.aspx
- Switch to month view
- Click on some day and enter options
- Try now to create event which occurse once it is all day and lasts only one day
- When You try to select the same start and end date while having all day selected then script is showing error Start time must be before end time
- When end date is selected to (startdate+1day) (all day event checkbox is selected too) then event is create for two days
EDIT: I'm using Q3 beta. There is one more thing. When I enter edit form for this evenI I see that end date is selected +1day so if I just save (without changing anything) then this event will be longer (+1day).
10 Answers, 1 is accepted
0
GrZeCh
Top achievements
Rank 2
answered on 01 Nov 2008, 09:42 AM
Telerik staff .. can you confirm that this is a bug?
0
Accepted
Hello,
Thank you for reporting this issue. We can confirm that this is a bug.
The fix turned out to be simple enough. You just need to replace the Start and End property getters in SchedulerDefaultForm.ascx.cs with these:
We will include these changes in the official Q3 release. Your Telerik points have been updated for your involvement.
All the best,
Tsvetomir Tsonev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Thank you for reporting this issue. We can confirm that this is a bug.
The fix turned out to be simple enough. You just need to replace the Start and End property getters in SchedulerDefaultForm.ascx.cs with these:
[Bindable(BindableSupport.Yes, BindingDirection.TwoWay)] |
public DateTime Start |
{ |
get |
{ |
return Range.Start; |
} |
// ... |
} |
[Bindable(BindableSupport.Yes, BindingDirection.TwoWay)] |
public DateTime End |
{ |
get |
{ |
return Range.Start.Add(Range.EventDuration); |
} |
// ... |
} |
We will include these changes in the official Q3 release. Your Telerik points have been updated for your involvement.
All the best,
Tsvetomir Tsonev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
GrZeCh
Top achievements
Rank 2
answered on 02 Nov 2008, 03:19 PM
Great. Thanks
0
Justin
Top achievements
Rank 1
answered on 11 Nov 2008, 04:09 PM
I'm still having a similar issue. When I go to create an appointment, I click "options" to get the "Advanced Edit Form". I uncheck "All Day Event" and set the end date to the same date as the start date and set the start time to say "9:00 AM" and the end time to "10:00 AM". When I click save it resets the times to "12:00 AM" and says "Start time must be before end time"
I am using RadControls Q3 2008
I am using RadControls Q3 2008
0
Hi Justin,
This is another problem that we have recently fixed. You need to replace the BasicControlsPanel_DataBinding function in SchedulerDefaultForm.ascx.cs with:
The fix will also be available in the upcoming SP.
Greetings,
Tsvetomir Tsonev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
This is another problem that we have recently fixed. You need to replace the BasicControlsPanel_DataBinding function in SchedulerDefaultForm.ascx.cs with:
protected void BasicControlsPanel_DataBinding(object sender, EventArgs e) |
{ |
AllDayEvent.Checked = IsAllDayAppointment(Appointment); |
} |
The fix will also be available in the upcoming SP.
Greetings,
Tsvetomir Tsonev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Justin
Top achievements
Rank 1
answered on 11 Nov 2008, 04:37 PM
So I have to put all those files into my project?
0
GrZeCh
Top achievements
Rank 2
answered on 11 Nov 2008, 04:41 PM
I have something to add here. Does end date must be startdate+1 day when setting allday events? I think when there should be something like
enddate = (startdate + how many days it should last) -1
so when creating allday event for one day should have startdate = enddate
What do you think about this?
enddate = (startdate + how many days it should last) -1
so when creating allday event for one day should have startdate = enddate
What do you think about this?
0
Accepted
Hi Justin,
I assumed you were using the external template files, as this thread discusses them. Please, open a formal support ticket, s we can send you the latest build that has this issue fixed in the integrated template too.
GrZeCh, I see what you mean. This is definitely possible and is indeed more usable. We have not implemented it, as we are trying to avoid confusion and to be consistent with the internal representation of the all-day appointments. We will consider if we should change our approach here. We might implement this change for the Q1 release, as it will be a breaking change.
The nice thing about the templates is that you are free to modify them as you wish. I am attaching you a modified version of SchedulerDefaultForm.ascx.cs that behaves in the way that you describe. Let me know if that is exactly what you had in mind.
All the best,
Tsvetomir Tsonev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I assumed you were using the external template files, as this thread discusses them. Please, open a formal support ticket, s we can send you the latest build that has this issue fixed in the integrated template too.
GrZeCh, I see what you mean. This is definitely possible and is indeed more usable. We have not implemented it, as we are trying to avoid confusion and to be consistent with the internal representation of the all-day appointments. We will consider if we should change our approach here. We might implement this change for the Q1 release, as it will be a breaking change.
The nice thing about the templates is that you are free to modify them as you wish. I am attaching you a modified version of SchedulerDefaultForm.ascx.cs that behaves in the way that you describe. Let me know if that is exactly what you had in mind.
All the best,
Tsvetomir Tsonev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
GrZeCh
Top achievements
Rank 2
answered on 12 Nov 2008, 11:03 AM
Yes. This is exactly what I was talking about.
Thanks
Thanks
0
illumination
Top achievements
Rank 2
answered on 11 Mar 2009, 08:52 PM
I have tried to do exactly your code but I still have the bug.
I actually prefer to have the all day checked and invisible and have the time showing like 6AM starttime and 8AM endtime. Is there a way to achieve it? But if I can get rid of the bug first that would be wonderful. Since I have tried to change the codes but still unsuccessful.
This is what my current code is:
Please help.
I actually prefer to have the all day checked and invisible and have the time showing like 6AM starttime and 8AM endtime. Is there a way to achieve it? But if I can get rid of the bug first that would be wonderful. Since I have tried to change the codes but still unsuccessful.
This is what my current code is:
<li class="rsTimePick"> |
<label for='<%= StartDate.ClientID %>_dateInput_text'><%= Owner.Localization.AdvancedFrom %></label> |
<telerik:RadDatePicker runat="server" ID="StartDate" CssClass="rsAdvDatePicker" |
Width="83px" SharedCalendarID="SharedCalendar" |
Skin='<%# Owner.Skin %>' |
Culture='<%# Owner.Culture %>'> |
<DatePopupButton Visible="False" /> |
<DateInput |
runat="server" |
DateFormat='<%# Owner.EditFormDateFormat %>' |
EmptyMessageStyle-CssClass="radInvalidCss_Default" EmptyMessage=" " /> |
</telerik:RadDatePicker> |
<telerik:RadTimePicker |
runat="server" ID="StartTime" CssClass="rsAdvTimePicker" |
Width="65px" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'> |
<DateInput runat="server" |
EmptyMessageStyle-CssClass="radInvalidCss_Default" EmptyMessage=" " /> |
<TimePopupButton Visible="false" /> |
<TimeView |
runat="server" |
Columns="2" ShowHeader="false" |
StartTime="08:00" EndTime="18:00" Interval="00:30" /> |
</telerik:RadTimePicker> |
</li> |
<li class="rsTimePick"> |
<label for='<%= EndDate.ClientID %>_dateInput_text'><%= Owner.Localization.AdvancedTo%></label> |
<telerik:RadDatePicker runat="server" ID="EndDate" CssClass="rsAdvDatePicker" |
Width="83px" SharedCalendarID="SharedCalendar" |
Skin='<%# Owner.Skin %>' |
Culture='<%# Owner.Culture %>'> |
<DatePopupButton Visible="False" /> |
<DateInput |
runat="server" |
DateFormat='<%# Owner.EditFormDateFormat %>' |
EmptyMessageStyle-CssClass="radInvalidCss_Default" EmptyMessage=" " /> |
</telerik:RadDatePicker><telerik:RadTimePicker |
runat="server" ID="EndTime" CssClass="rsAdvTimePicker" |
Width="65px" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'> |
<DateInput ID="DateInput1" runat="server" |
EmptyMessageStyle-CssClass="radInvalidCss_Default" EmptyMessage=" " /> |
<TimePopupButton Visible="false" /> |
<TimeView |
runat="server" |
Columns="2" ShowHeader="false" |
StartTime="08:00" EndTime="18:00" Interval="00:30" /> |
</telerik:RadTimePicker> |
</li> |
<Bindable(BindableSupport.Yes, BindingDirection.TwoWay)> _ |
Public Property Start() As DateTime |
Get |
Return Range.Start |
End Get |
Set(ByVal value As DateTime) |
If IsAllDayAppointment(Appointment) Then |
StartDate.SelectedDate = Owner.UtcToDisplay(value) |
StartTime.SelectedDate = Owner.UtcToDisplay(value).AddHours(8) |
Else |
StartDate.SelectedDate = Owner.UtcToDisplay(value) |
StartTime.SelectedDate = Owner.UtcToDisplay(value) |
End If |
End Set |
End Property |
<Bindable(BindableSupport.Yes, BindingDirection.TwoWay)> _ |
Public Property [End]() As DateTime |
Get |
Return Range.Start.Add(Range.EventDuration) |
End Get |
Set(ByVal value As DateTime) |
If IsAllDayAppointment(Appointment) Then |
EndDate.SelectedDate = StartDate.SelectedDate |
EndTime.SelectedDate = Owner.UtcToDisplay(value).AddHours(18) |
Else |
EndDate.SelectedDate = Owner.UtcToDisplay(value) |
EndTime.SelectedDate = Owner.UtcToDisplay(value) |
End If |
End Set |
End Property |
Protected Sub BasicControlsPanel_DataBinding(ByVal sender As Object, ByVal e As EventArgs) |
'If IsAllDayAppointment(Appointment) Then |
' AllDayEvent.Checked = True |
' StartTime.Enabled = False |
' EndTime.Enabled = False |
'Else |
' AllDayEvent.Checked = False |
' StartTime.Enabled = True |
' EndTime.Enabled = True |
'End If |
AllDayEvent.Checked = IsAllDayAppointment(Appointment) |
End Sub |