|
<SfSchedule TValue="AppointmentData" Height="550px" SelectedDate="@(new DateTime(2020, 1, 9))">
<ScheduleEventSettings DataSource="@DataSource"></ScheduleEventSettings>\
</SfSchedule>
@code{
List<AppointmentData> DataSource = new List<AppointmentData>
{
new AppointmentData { Id = 1, Subject = "Meeting", StartTime = new DateTime(2020, 1, 6, 9, 30, 0) , EndTime = new DateTime(2020, 1, 6, 11, 0, 0),
RecurrenceRule = "FREQ=DAILY;INTERVAL=1;COUNT=5" }
};
public class AppointmentData
{
public int Id { get; set; }
public string Subject { get; set; }
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
public string RecurrenceRule { get; set; }
public Nullable<int> RecurrenceID { get; set; }
public string RecurrenceException { get; set; }
}
}
<style>
.e-today{
display: none !important; // To hide Today option
}
</style> |
Hi,
Instead of hiding it, can we make it Today button is really scroll to current date at 1st column position?
|
@code{
DateTime CurrentDate = new DateTime(2020, 2, 14); SfSchedule<AppointmentData> ScheduleObj; public void ScheduleCreated() { DateTime currTime = DateTime.Now; string hours = currTime.Hour < 10 ? '0' + currTime.Hour.ToString() : currTime.Hour.ToString(); string minutes = currTime.Minute.ToString(); string time = hours + ':' + minutes; ScheduleObj.ScrollToAsync(time); } } |