Cambio de color

Buenos días 

Es posible que las celdas parpadeen cuando tengan una condición, es decir si tiene una categoria y ya paso la hora de la cita parpadeen de color azul 

Gracias

3 Replies

NR Nevitha Ravi Syncfusion Team March 28, 2018 03:50 AM UTC

Hi Veronica, 

We suspect and understand that your requirement is to change the appointment color for which we have prepared a sample using categorizeSettings property that can be downloaded from the below link. 

Kindly refer the below UG and online sample link. 

UG: https://help.syncfusion.com/aspnet/schedule/working-with-appointments#categorization 

Kindly revert us back your requirement in English as we are not clear about your requirement details to provide you prompt solution. 

Regards, 
Nevitha. 



VO veronica orozco March 28, 2018 03:06 PM UTC

Thanks for the reply,
I say if there is any way that when an appointment is fulfilled the cell begin to twinkle as shown by the attached gif

Attachment: Veronica.Celda_fedd2228.zip


NR Nevitha Ravi Syncfusion Team April 2, 2018 07:19 PM UTC

Hi Veronica, 

Thanks for your update. 

With the below code snippet, we have blinked the underlying cell, when an user try to create an appointment on the cell that already contains another appointment. At such time, we have made the underlying cell to blink as well as prevented the adding of appointments to that cell by making use of the BeforeAppointmentCreate and CellClick events. 

<ej:schedule id="Schedule1" clientidmode="Static" height="525px" width="100%" currentdate="5/5/2014" runat="server" datasourceid="SqlDataSource1" BeforeAppointmentCreate="onBeforeAppointmentCreate" CellClick="onCellClick"> 
        <AppointmentSettings Id="Id" Subject="Subject" AllDay="AllDay" StartTime="StartTime" EndTime="EndTime" Recurrence="Recurrence" RecurrenceRule="RecurrenceRule" /> 
    </ej:schedule> 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultConnection %>" SelectCommand="SELECT * FROM [Appointment]"></asp:SqlDataSource>    
 
 var tar, col = 0, count = 0; 
    function onCellClick(args) {; 
        tar = args.target.currentTarget; 
    } 
    function onBeforeAppointmentCreate(args) { 
        app = ej.isNullOrUndefined(args.appointment[0]) ? args.appointment : args.appointment[0]; 
        overlapList = this._overlapApp(app["AppTaskId"], app[this._appointmentSettings["startTime"]], app[this._appointmentSettings["endTime"]], null); 
        if (overlapList.length > 0) { 
            args.cancel = true; 
            tarInterval = setInterval(changeMarqueeColor, 500); 
        } 
    } 
    function changeMarqueeColor() { 
        $(tar).removeClass('e-selectedCell'); 
        if (col == 0) { 
            $(tar).css("background-color", "red"); 
            col = 1; 
        } 
        else { 
            $(tar).css("background-color", "blue"); 
            col = 0; 
        } 
        count++; 
        if (count == 10) { 
            clearInterval(tarInterval); 
        } 
    } 

Kindly refer the above code to make the cell to twinkle and you can change the condition however based on which you need to perform such action on your application. Please let us know, whether it satisfies your requirement and also if you need any further assistance on this. 

Regards, 
Nevitha. 


Loader.
Up arrow icon