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

Scheduler Validation

11 Answers 99 Views
This is a migrated thread and some comments may be shown as answers.
Luis Ismael
Top achievements
Rank 1
Luis Ismael asked on 11 Jul 2018, 12:38 AM

How can I validate the title if it is empty

 

fields: {
taskId: { type: 'number' },
title: { validation: { required: true } },  /* Validation not working */
start: { type: 'date'},
end: { type: 'date' },
IdUsuario: { defaultValue: 1 },
IdSucursal: { nullable: true },
}

 

<kendo-scheduler :data-source="localDataSource"
:date="date"
:timezone="'Etc/UTC'"
:allDaySlot="false"
:height="750"
schema-model-id="taskId"
:schema-model-fields="fields"
:resources="catalogs"
:messages="messages"
@change="onChange"
@edit="onEdit"
@add="onAdd"
@cancel="onCancel"
@dataBound="onDataBound"
@move="onMove"
@navigate="onNavigate"
@resize="onResize"
@save="onSave">
<kendo-scheduler-view :type="'day'" :selected="true"></kendo-scheduler-view>
<kendo-scheduler-view :type="'workWeek'"></kendo-scheduler-view>
<kendo-scheduler-view :type="'week'"></kendo-scheduler-view>
<kendo-scheduler-view :type="'month'"></kendo-scheduler-view>
<kendo-scheduler-view :type="'agenda'"></kendo-scheduler-view>
</kendo-scheduler>

11 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 12 Jul 2018, 10:38 AM
Hello,

You can refer to this sample demo where the validation worked correctly at my side.

Regards,
Plamen
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Luis Ismael
Top achievements
Rank 1
answered on 12 Jul 2018, 05:05 PM

Thanks for the reply.

but the validation of the title does not work in the example and I would like the title to be required.

 


0
Plamen
Telerik team
answered on 13 Jul 2018, 05:49 AM
Hi,

I have tested the scenario once again but could not insert or update the appointment to be with empty title. Here is my test video. Would you please review it and let me know what else should be done in order to replicate the issue?

Regards,
Plamen
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Luis Ismael
Top achievements
Rank 1
answered on 13 Jul 2018, 07:37 PM

you think it's my browser problem, probe with chrome, safari, firefox. and it does not work

 

https://www.screencast.com/t/j6xznNwk8Ka

0
Ianko
Telerik team
answered on 17 Jul 2018, 10:43 AM
Hi Luis,

The browser is not suggested as possible reason for the described behavior. It is rather related to the setup. The sample linked by Plamen is working as expected and title is validated properly. The best option for us to see and examine the difficulties you have is by changing the code in the sample provided and share the link with the updates. That way we will be able to check the exact code and case that causes the issue. 

Regards,
Ianko
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Luis Ismael
Top achievements
Rank 1
answered on 17 Jul 2018, 03:54 PM

the problem is that the example that I look at is the one in the documentation of vue

in this example https://www.telerik.com/kendo-vue-ui/components/scheduler/

video example https://www.screencast.com/t/j6xznNwk8Ka

0
Ianko
Telerik team
answered on 18 Jul 2018, 04:51 AM
Hello Luis,

The demo linked is not dedicated to show validation of fields bound through local sources. However, this can be achieved by setting up a kendo.data.SchedulerDataSource instance to the datasource, where you can define the model's fields and their validation.  Here you are a modified example: https://plnkr.co/edit/t3vFg2UnMxsSChwq9Z3c?p=preview.

Regards,
Ianko
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ianko
Telerik team
answered on 18 Jul 2018, 04:57 AM
Hello Luis,

The plunker linked in my last reply hasn't updated properly. Here you are a new one: https://plnkr.co/edit/V9gtYLy6CNNLYzbUS8BP?p=preview.

Regards,
Ianko
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Luis Ismael
Top achievements
Rank 1
answered on 18 Jul 2018, 09:19 AM

new kendo.data.SchedulerDataSource It works very well

my question is how to add more elements or eliminate using kendo.data.SchedulerDataSource

Thanks lanko

0
Ianko
Telerik team
answered on 18 Jul 2018, 11:14 AM
Hi Luis,

As the SchedulerDataSource extends the DataSource, it is best to use the API methods to interfere with the data bound to the DataSource of the widget used. You can check the API documentation here: https://docs.telerik.com/kendo-ui/api/javascript/data/datasource.

Also, if you are interested in reactive binding, you can check out this more advanced example of Kendo UI, Vue and Vuex here: https://www.telerik.com/blogs/get-more-out-of-vue-kendo-ui-using-vuex

Regards,
Ianko
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Luis Ismael
Top achievements
Rank 1
answered on 18 Jul 2018, 08:01 PM
Thanks for the help lanko, you can solve the problem with the Scheduler :)
Asked by
Luis Ismael
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Luis Ismael
Top achievements
Rank 1
Ianko
Telerik team
Share this question
or