We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Binding to e-work-week fails with a Uncaught setModel - Invalid input for property :workWeek - Expected type - array

I am binding to an array of days in my view-model similar to the javascript example but the binding fails with a "Uncaught setModel - Invalid input for property :workWeek - Expected type - array"

I am using Chrome. 

in my template:

e-work-week="WorkWeek" e-resources.bind="Resources" e-current-date="04/03/2014" e-current-view="workWeek">

in my view-model:

this.WorkWeek = ['Sunday', 'Monday', 'Tuesday', 'Friday', 'Saturday'];

Full Example here - https://gist.run/?id=781e895428f9ee84fe334c3634ab61f2

Any ideas on how I can resolve without jumping back to Jquery?

3 Replies

KK Karthigeyan Krishnamurthi Syncfusion Team September 1, 2017 05:53 AM UTC

Hi Wayne, 
 
Thank you for contacting Syncfusion support. 
 
We have prepared the Aurelia sample to custom work week days which can be viewed from the below location. Kindly use the below code example to overcome the reported issue. 
 
<Code> 
App.html 
<ej-schedule id="Schedule1" e-width="100%" e-height="525px" e-work-week.bind="WorkWeek" e-appointment-settings.bind="AppointmentList" e-current-date="04/03/2016"> 
</ej-schedule> 
 
App.ts 
this.WorkWeek = ['Sunday', 'Monday', 'Tuesday', 'Friday', 'Saturday']; 
</Code> 
 
Regards, 
Karthigeyan 




WM Wayne Massey September 1, 2017 01:02 PM UTC

Karthigeyan.. Thank you.. Y'all rock!!! 




NR Nevitha Ravi Syncfusion Team September 4, 2017 10:17 AM UTC

Hi Wayne, 

We are glad that our solution has resolved your issue. 
  
Regards, 
Nevitha.   

Loader.
Live Chat Icon For mobile
Up arrow icon