I have a problem with (RadCalendar)PatientScheduler.FindControl("SelectedDateCalendar"). everything is ok on popup calendar but seleteddate(systemselected.png) is different with user selecteddate(userselected.png)
7 Answers, 1 is accepted
0
Hello shahab.
Would you please share what is the code you are using to transform the default PatientScheduler.FindControl("SelectedDateCalendar") to the one from the attached image so we could inspect the issue and think for a possible solution?
Plamen
the Telerik team
Would you please share what is the code you are using to transform the default PatientScheduler.FindControl("SelectedDateCalendar") to the one from the attached image so we could inspect the issue and think for a possible solution?
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
shahab
Top achievements
Rank 1
answered on 30 Apr 2013, 06:30 PM
I did not change seletedDate on runTime and I did not write code. when I want to change SelectedDate by using SelectedDateCalendar it selects different Time, showed Date in Pop SelectedDateCalendar is different with selected Date.
public partial class Patient_PatientScheduler : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //PatientScheduler.SelectedDate = DateTime.Now.AddDays(1); PatientScheduler.MinutesPerRow =Convert.ToInt32(ConfigurationManager.AppSettings["Interval"]); } } protected void PatientScheduler_AppointmentInsert(object sender, AppointmentInsertEventArgs e) { if (e.Appointment.Start < DateTime.Now) { e.Cancel = true; throw new Exception("time must be after today"); } if (e.Appointment.Start.TimeOfDay > e.Appointment.End.TimeOfDay) { e.Cancel = true; throw new Exception("start time must be before end time"); } if(e.Appointment.End.TimeOfDay.Subtract(e.Appointment.Start.TimeOfDay) > new TimeSpan(0,15,0)) { e.Cancel = true; throw new Exception("differece of start time and end time should be less than interval"); } } protected void PatientScheduler_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e) { TimeSpan endTime = e.ModifiedAppointment.End.TimeOfDay; e.ModifiedAppointment.End = e.Appointment.End; e.ModifiedAppointment.End = e.ModifiedAppointment.End.Add(endTime - e.ModifiedAppointment.End.TimeOfDay); TimeSpan startTime = e.ModifiedAppointment.Start.TimeOfDay; e.ModifiedAppointment.Start = e.Appointment.Start; e.ModifiedAppointment.Start = e.ModifiedAppointment.Start.Add(startTime - e.ModifiedAppointment.Start.TimeOfDay); if (e.ModifiedAppointment.Start.TimeOfDay > e.ModifiedAppointment.End.TimeOfDay) { e.Cancel = true; throw new Exception("start time must be before end time"); } }
protected void PatientScheduler_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
{ RadScheduler scheduler = (RadScheduler)sender; RadComboBox patientsComboBox = (RadComboBox)e.Container.FindControl("PatientsComboBox"); if (patientsComboBox != null && Profile.PatientId != 0) { patientsComboBox.SelectedIndex = patientsComboBox.FindItemIndexByValue(Profile.PatientId.ToString()); patientsComboBox.Enabled = false; } RadComboBox appointmentStatesComboBox = (RadComboBox)e.Container.FindControl("AppointmentStatesComboBox"); if (appointmentStatesComboBox != null) { appointmentStatesComboBox.SelectedIndex = 0; appointmentStatesComboBox.Enabled = false; } RadComboBox doctorAppointmentComboBox = (RadComboBox)e.Container.FindControl("DoctorAppointmentComboBox"); if (doctorAppointmentComboBox != null) { if (doctorAppointmentComboBox.Items.Count <= 0) throw new Exception("time must be exist"); } RadTimePicker startTime = (RadTimePicker)e.Container.FindControl("StartTime"); startTime.TimeView.StartTime = PatientScheduler.DayStartTime; startTime.TimeView.EndTime = PatientScheduler.DayEndTime; startTime.SelectedTime = e.Appointment.Start.TimeOfDay; RadTimePicker endTime = (RadTimePicker)e.Container.FindControl("EndTime"); endTime.TimeView.StartTime = PatientScheduler.DayStartTime; endTime.TimeView.EndTime = PatientScheduler.DayEndTime; endTime.SelectedTime = e.Appointment.End.TimeOfDay; startTime.ClientEvents.OnDateSelected = "OnDateSelected";
EndTimeHiddenField.Value = endTime.ClientID; DoctorsComboBox.Enabled = false; }
protected void DateCalendar_SelectionChanged(object sender, EventArgs e) { PatientScheduler.SelectedDate = DateCalendar.SelectedDate.Date; PatientScheduler.Rebind(); } protected void PatientScheduler_PreRender(object sender, EventArgs e) { if (((RadCalendar)PatientScheduler.FindControl("SelectedDateCalendar")) != null) ((RadCalendar)PatientScheduler.FindControl("SelectedDateCalendar")).Visible = false; }}0
Hello shahab,
Plamen
the Telerik team
I have inspected the issue on my sample web page with Persian culture but could not observe the unusual issue. Here is a video of my test. Please review it and let me know what else should I do in order to observe the same behavior.
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
shahab
Top achievements
Rank 1
answered on 03 May 2013, 01:33 PM
Please select date from popup calendar, You just select from next and prev icon
0
Hello shahab,
Plamen
the Telerik team
I have tested with clicking on the calendar but still could not observe the unusual behavior.Here is the new video. Would you please review it and let me know what else should I do in order to observe the same behavior.
Regards,Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
0
Hi shahab,
This transformation is caused by the fact that RadCalendar is not designed to display Persian calendar. Please excuse us for this limitation of our control.
All the best,
Plamen
the Telerik team
This transformation is caused by the fact that RadCalendar is not designed to display Persian calendar. Please excuse us for this limitation of our control.
All the best,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
