iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi all,
I want to color days since 2010-03-29 till 2010-04-03, I used the code below:
function SetBackgroundColor(elements, color, isHourArea) {for (var i = 0; i < elements.length; i++) {var el = elements[i];if (el != null) {if (isHourArea) {el.children[0].style.backgroundColor = color;}else {el.style.backgroundColor = color;}}}}function WebScheduler1_OnAfterRenderView(controlId, viewMode) { var WebScheduler1 = ISGetObject(controlId); var isHourArea = viewMode != "Timeline"; var arr = new ISArray(); arr.Add(new WebSchedulerDateRange(new Date(2010, 2, 29, 0, 0, 0, 0), new Date(2010, 3, 3, 0, 0, 0, 0),1, "DateTime")); var elements = WebScheduler1.GetCellElements(arr); SetBackgroundColor(elements, "#555500", isHourArea); return true;}
I have problems with Week, Quarter and Year view, look at the screen shots:
Could someone help me?
Thanks in advance,
Vince
Hi Vince,
Forgive me, however, I am not able to replicate your issue. I have tried that and in my end, everything works nicely. I also attached you my screen shot in every view mode, please kindly take a look.
I also attached you the latest build of WebScheduler, perhaps you can simply copy them to your bin folder into your project.
I hope it helps. Thank you and have a nice day.
Best Regards,
Andi Santoso
Hi Vincenzo,
I am able to replicate the issue of yours. I have forwarded this to our Developer team. I will inform you as soon as possible when I get news from them.
Just wanted to let you know that the issue has been fixed and the build can be downloaded in here. However, this is a nightly build and the disclaimer is on. Any feedbacks regarding this build is highly appreciated since this particular build has not been tested intensively.
However, for week view, it is not a issue. With that kind of range, the disabled time starts from 29th of March 00:00:00 to 3rd of April 00:00:00. In this configuration 3rd of April will not be marked, because the disabled time ends at 3rd of April 00:00:00. If 3rd of April should be set as disabled time, you will need to set the end of disabled time to 3rd of April 23:59:59 or 4th of April 00:00:00.
Here is the snippet in order to do so:
arr.Add(new WebSchedulerDateRange(new Date(2010, 2, 29, 0, 0, 0, 0), new Date(2010, 3, 4, 0, 0, 0, 0), 1, "DateTime"));
the week view is an issue: the problem is not on the 3rd of April but is on the 2nd of April, look better at the previous attached image WeekView.png: I set the interval
var arr = new ISArray();arr.Add(new WebSchedulerDateRange(new Date(2010, 2, 29, 0, 0, 0, 0), new Date(2010, 3, 3, 0, 0, 0, 0), 1, "DateTime"));
the 2nd of April that should be green but is not colored.
Regards,
Forgive me, however, I am getting confused in here. As you posted on the first post, you wanted to mark a date from 2010-03-29 until 2010-04-03, in order to do so, here is the snippet:
arr.Add(new WebSchedulerDateRange(new Date(2010, 2, 29, 0, 0, 0), new Date(2010, 3, 4, 0, 0, 0), 2, "DateTime"));
And as you noticed, in your provided code sample you have set them with:
arr.Add(new WebSchedulerDateRange(new Date(2010, 2, 29, 0, 0, 0), new Date(2010, 3, 3, 0, 0, 0), 2, "DateTime"));
In this case, yes, you will mark dates from 2010-03-21 until 2010-03-02. As you might see on my attachment, I have set them with this range and the 2nd April is marked.
I updated WebScheduler to version 3.0.1000.5 and WebDesktop to version 3.0.7200.310, but I still have problem regarding that issue.
I want to color since 2010-03-29 till 2010-04-02, the code I use is the following:
function WebScheduler1_OnAfterRenderView(controlId, viewMode) { var WebScheduler1 = ISGetObject(controlId); var isHourArea = viewMode != "Timeline" && viewMode != "Month"; var arr = new ISArray(); arr.Add(new WebSchedulerDateRange(new Date(2010, 2, 29, 0, 0, 0, 0), new Date(2010, 3, 3, 0, 0, 0, 0), 1, "DateTime")); var elements = WebScheduler1.GetCellElements(arr); SetBackgroundColor(elements, "#555500", isHourArea); return true;}function SetBackgroundColor(elements, color, isHourArea) { for (var i = 0; i < elements.length; i++) { var el = elements[i]; if (el != null) { if (isHourArea) { el.children[0].style.backgroundColor = color; } else { el.style.backgroundColor = color; } } }}
as you can see I use the instruction
arr.Add(new WebSchedulerDateRange(new Date(2010, 2, 29, 0, 0, 0, 0), new Date(2010, 3, 3, 0, 0, 0, 0), 1, "DateTime"));
that should be correct to get cells since 2010-03-29 till 2010-04-02.
Now look at the attached images:
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname