This is a migrated thread and some comments may be shown as answers.

Scheduler doesn't display current date in k-nav-current

2 Answers 211 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Andres
Top achievements
Rank 1
Andres asked on 22 Jan 2014, 03:45 PM
Hi,

I'm using a Scheduler defined like this:

$("#scheduler").kendoScheduler({
    date: new Date(),
    startTime: new Date("2013/11/27 07:00 AM"),
    endTime: new Date("2013/11/27 06:00 PM"),
    workDayStart: new Date("2013/1/1 08:00 AM"),
    workDayEnd: new Date("2013/1/1 6:00 PM"),
    selectable: true,
 
    views: [
        { type: "day", allDaySlot: false },
        { type: "week", selected: true, allDaySlot: false },
        "month",
        "agenda"
 
    ],
 
    editable: {
        template: kendo.template($("#schedulerTemplate").html())
    },
    dataSource: _dataSourceDetailedAppointmentScheduler,
    edit: _api.onEditScheduler,
    cancel: _api.onCancelScheduler,
    save: _api.onSaveScheduler,
    navigate: _api.onNavigate,
    moveStart: _api.onMoveStart,
    mobile: true,
    messages: {
        cancel: "Cancelar",
        date: "Fecha",
        deleteWindowTitle: "Borrar visita",
        event: "Visita",
        save: "Guardar",
        showFullDay: "Mostrar las 24 Horas",
        showWorkDay: "Mostrar horas laborales",
        time: "Hora del día",
        today: "Hoy",
        editor: {
            editorTitle: "Crear/Editar Visita"
        },
        views: {
            day: "Día",
            week: "Semana",
            month: "Mes",
            workWeek: "Semana laboral"
        }
    },
    resources: [
        {
            field: "CommertialRepresentativeId", // The field of the scheduler event which contains the resource identifier
            title: "Representante Comercial", // The label displayed in the scheduler edit form for this resource
            dataSource: [
                {
                    text: "Representante 1", // Text of the resource instance
                    value: 1, // Identifier of the resource instance, use that value to assign an event to this instance.
                    color: "#ff0000" // Used as the background of events assigned to this resource.
                },
            ],
            multiple: false // Indicate the this is a multiple instance resource
        }
    ]
 
});
But the k-current-nav styled anchor element:

<li class="k-state-default k-nav-current"><a role="button" href="#" class="k-link"><span class="k-icon k-i-calendar"></span><span data-bind="text: formattedDate"></span></a></li>
Does not display a formattedDate as it should. I went through the API but there seems to be no way to override this "formattedDate" property.

Could you please point me in the right direction?

Regards.

PS: I've attached an image file that shows an icon without any text where the formattedDate range should appear.

2 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 23 Jan 2014, 09:19 AM
Hi Andres,

Unfortunately, it is not clear what may be the cause for the described behavior looking at the provided information. Could you please verify that there are no JavaScript errors on the page? Also it will be appreciated if you could provide a small sample in which this issue can be observed locally. 

Regards,
Rosen
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Dorian
Top achievements
Rank 2
answered on 11 Sep 2014, 09:25 AM
Rosen, I've just had the same problem and resolved the issue.

I'm doing a MVVM SPA application but I started my scheduler outside the observable object as Anders did.
That lead to the ObservableObject trying to bind with the scheduler although it shouldn't have. It resulted in the aforementioned error.

So I did a minor workaround to start my scheduler after the binding process is complete and now everything works peachy.
Tags
Scheduler
Asked by
Andres
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Dorian
Top achievements
Rank 2
Share this question
or