samedi 9 mai 2015

jquery onload select days

I'm using this plugin to select multiple week days from the user. As I can see everything is setup correctly, I can select days, save that data to the db and on editing I can retrieve data back to the ui, but problem is that this data is correctly loaded on edit mode inside ui but it's not selected on week days ui control.

1 picture is saying more that 1000 words :)

on load data (edit mode) this is current situation enter image description here

but should be like this enter image description here

this input with id DaysOfWeekSelected once setup correctly will be hidden by default.

Knowing all this and having data already inside view how can select this days from index (0,5,6) into plugin?

Just to mention that all scripts are loaded correctly, plugin works correctly on user selection (change days).

Update: I tried with some dummy data select days on page load using

$("#repeatOnDays").weekLine("setSelected", "0,1,2,3,4");

anyone to help?

Aucun commentaire:

Enregistrer un commentaire