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

Wrong types for timeScale property in Typescript

The schedule component has wrong types definition for the timescale property.

The types for majorSlotTemplate should also include HTMLElement in typescript.

<ScheduleComponent
cssClass='timeline-resource'
width='100%'
timeScale={
{
interval: 60,
slotCount: 4,
// the type for majorSlotTemplate are currently "string | undefined"
// the types should also include the HTML element
majorSlotTemplate: majorSlotTemplate.bind(this), // THESE TYPES ARE WRONG, VSCode shows an error
enable: true,
}
}
>
<ResourcesDirective>
</ResourcesDirective>
<ViewsDirective>
<ViewDirective option='TimelineDay' />
<ViewDirective option='TimelineWeek' />
</ViewsDirective>
<Inject services={[TimelineViews, Resize, DragAndDrop]} />
</ScheduleComponent>

5 Replies

MW Marc Wittwer March 15, 2023 08:12 PM UTC

I found more fields with the wrong type definitions for the typescript version:

schedule-model.d.ts

/**
* It accepts either the string or HTMLElement as template design content and parse it appropriately before displaying it onto
* the month date cells. This template is only applicable for month view day cells.
*
* {% codeBlock src='schedule/cellHeaderTemplate/index.md' %}{% endcodeBlock %}
*
* @default null
*/
cellHeaderTemplate?: string;

/**
* It accepts either the string or HTMLElement as template design content and parse it appropriately before displaying it onto
* the day header cells. This template is only applicable for year view header cells.
*
* {% codeBlock src='schedule/dayHeaderTemplate/index.md' %}{% endcodeBlock %}
*
* @default null
*/
dayHeaderTemplate?: string;

/**
* It accepts either the string or HTMLElement as template design content and parse it appropriately before displaying it onto
* the month header cells. This template is only applicable for year view header cells.
*
* {% codeBlock src='schedule/monthHeaderTemplate/index.md' %}{% endcodeBlock %}
*
* @default null
*/
monthHeaderTemplate?: string;

/**
* The template option which is used to render the customized work cells on the Schedule. Here, the template accepts either
* the string or HTMLElement as template design and then the parsed design is displayed onto the work cells.
* The fields accessible via template are as follows.
* * date
* * groupIndex
* * type
*
* Refer to the below code snippet.
*
* {% codeBlock src='schedule/cellTemplate/index.md' %}{% endcodeBlock %}
*
* @default null
*/
cellTemplate?: string;


All these fields should have the type " string | HTMLElement ". Or am I wrong?


Thanks a lot for having a l




AR Anbumani Rajendracholan Syncfusion Team March 29, 2023 04:21 PM UTC

Hi Marc Wittwer,

 

Sorry for the delay caused.

 

We have considered your requirement and have logged the feature request from our end. We have created feedback for this and will include this feature in our upcoming Vol 1 2023, Service pack release. You can track the status of this feature in the feedback below.

 

Feedback: https://www.syncfusion.com/feedback/42490/need-to-provide-a-types-for-majorslottemplate-should-include-htmlelement 

 

Please be patience until then.

 

Regards,

Anbumani Rajendracholan




TJ Theveshwar Jayakumar Syncfusion Team May 11, 2023 11:08 AM UTC

Hi Marc Wittwer,


Sorry for the inconvenience caused.


We could not include this feature with our Volume 1 service pack release. However, we have prioritized this feature, and planned to include this in our upcoming 2023 Volume 2 release which is scheduled to be rolled out in the end of June. You can tract the status of this feature in the below feedback link.


Feedback Link:  https://www.syncfusion.com/feedback/42490/need-to-provide-a-types-for-majorslottemplate-should-include-htmlelement


Until we appreciate your patience


Regards,

Theveshwar



AR Anbumani Rajendracholan Syncfusion Team June 28, 2023 05:56 AM UTC

Hi Marc Wittwer,


Sorry for the inconvenience caused.


We are unable to include this feature as planned due to high complications and we are working on the reported issue with high priority. We will prioritize to include this in our upcoming Volume 2 service pack release which is scheduled to be rolled out on end of July 2023. You can tract the status of this feature in the below feedback link.


Feedback Link:  https://www.syncfusion.com/feedback/42490/need-to-provide-a-types-for-majorslottemplate-should-include-htmlelement


Until we appreciate your patience


Regards,
Anbumani Rajendracholan



TJ Theveshwar Jayakumar Syncfusion Team August 3, 2023 05:42 AM UTC

Hi Marc Wittwer,

 

We are glad to announce that our Essential Studio 2023 Volume 2 SP release v22.2.5 is rolled out and is available for download under the following link.

 

https://www.syncfusion.com/forums/183720/essential-studio-2023-volume-2-service-pack-release-v22-2-5-is-available-for-download

 

The issue with “the Schedule component throwing compilation issues while using the timeScale property in the TypeScript sample” has been resolved in this release. To access this fix, we suggest you to update the package to the latest version v22.2.5.

 

We have also prepared a sample and attached the screenshot for your reference. You can find the release notes at the link below.

 

Release Notes: https://ej2.syncfusion.com/react/documentation/release-notes/22.2.5/?type=all#carousel

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Sample1599392865.zip

Screenshot before fixing the issue:
 

 

Screenshot after fixing the issue in our latest version:

 



 

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

 

Regards,

Theveshwar


Loader.
Up arrow icon