Silica Calendar - Incorrect

The calendar appears to be programmed incorrectly - Monday 28th March (today) is definitely not a Saturday as the calendar shows - I think the wrong year has been put in - don't know how else to report the problem.
11,263 views 28 replies
Reply #1 Top
Chaging line 133 in the dateMotnhText script fixed it for me

Was
ulFirstDay = DatePart("w", pFirstDay, 0)

Changed to
ulFirstDay = DatePart("w", pFirstDay, 7)

0 uses the NLS setting whereas I think the scripts assumes Saturday (7)

Hope this helps
Reply #2 Top
Many thanks for the advice but how the hell to I get at the dateMonthText script I need to edit. I've tried everything I can think of - I've found a script file with the line you mention (but no 136) - every time I change it and save, it eventually reverts back to previous when I try to use the widget again. 1.5 hrs spent so far - please help.
Reply #3 Top
You have to open DesktopX builder.
Import the widget.
List objects.
Click on the dateMontText object.
Edit script.
Close script window
Save.
Test.
If it is fixed you then need to export Calendar object as a widget.
You can then run this widget from your end-user DesktopX.
Reply #4 Top
Finally someone who know something! w00t!

Hi JavaScout!

You say "List objects".

??

Where and how do I do that?

DX is so userunfriendly that I'm sitting crying in the corner here =~(

Stephen, it's the days at the top that are at fault.
They start with Saturday when they should start with Sunday.
If the weeks start with Sunday the dates will be correct.

I've reported this error earlier but no one has cared to answer.
Hopefully JavaScout can help out
Reply #5 Top
Stephen!

I've found a way to get to that script.

Updated!

Here's how...

1. Start DesktopX

2. Press "Create" to start the Builder

3. In the popup window press the Desktop tab.

4. Under "Objects" click the "Import.." Button

5. In the popup window that appears select the Widgets radiobox

6. Scroll down to the Silica Calendar widget and double click it.

7. With the calendar showing on the desktop press the "List" button
in the DesktopX Builder window.

8. In the new popup window called "Object Navigator" you will
find the dateMontText object.

9. Well, I've tried to edit the script but it won't stay saved with the widget
when you close the widget, no matter what I do =\

But there you go, that's how you find the scripts.

Hopefully JavaScout can help with the rest
Reply #6 Top
Good step by step instructions lilstarfish.

Once you have edited the script close the script window down (File/Exit) then press apply on the dateMonthText - Properties. Then click ok.
You should now have a corrected calendar.

If everything is ok go back to the Object Navigator window whichstill should be up.
Select the cal_back object id from the list.
Right click and select export.

In the dialog box that come up make sure Export as widget(exe) is selected and that
Selected and Related is checked.

Click next.
File in the entries and click next again.
Set the file name of the widget (Something like MyCalendar.exe)
Click Finished.

You should get a confirmation dialog that the exe was created.

Close the Object Navigator Window.

Unload Desktop X builder by right clicking on the Sytray entry and choosing unload.
Start Desktop X up.
If you have the calendar still in Desktop X remove it by right clicking the object and selecting remove.
Open the DesktopX panel (You should get some icons for Widgets/Objects/Settings etc)
Click on widgets and select your widget (MyCalendar.exe)
You should now be running your corrected calendar widget.
Reply #7 Top
Many thanks to both of you - I have done as instructed and all looks good at first sight - UNFORTUNATELY - the months following and preceeding do not follow on correctly i.e. last day of May is THURSDAY 31st (which is correct) but April seems to then start on WEDNESDAY 1st! Do both of yours do this or is it just a problem at my end?
Reply #8 Top
Many thanks JavaScout for your kindness!

The calendar now shows the correct information here!

Stephen:

Did you make sure you checked the radio button named "Selected and Related",
when exporting the new calendar?

Also, after making the new widget you need to make sure that
the old calendar is not loaded when DesktopX starts.

So as JavaScout suggests;

1. Unload Desktop X builder by right clicking on the Sytray entry and choosing unload.

2. Start Desktop X up.

3. In the DesktopX Welcome screen select Load Widgets

4. In the DesktopX Widget popup window, check that
there is no calendar listed in the "Loaded Widgets" area.
(if there is, just select the calendar and press the "Unload" button)

5. Now, just press the "Load Widgets..." button and navigate
to your previously exported and newly named calendar widget.

That should be it! =D

Let us know how it goes

Big thanks again to JavaScout for helping out and for doing
so in a way that was easy to follow, you rock! =D
Reply #9 Top
Lilstarfish & JavaScout - thank you both for all the time effort and advice you've put in. I've tried uninstalling and re-installing Desktop X which downloaded me a fresh copy of the calendar - even on the 'new' copy the following month starts 2 days early even before I've made any changes so I guess it might be something to do with UK windows config. I've tried trailing through the script and experimented with my best guesses but nothing seems to help so unless JavaScout or someone who understands the inner meanings of these scripts can help I'll have to use another calendar - shame
Reply #10 Top
I will take a look at it when I get home in a couple of hours.
Hang in there.

Reply #11 Top
Hi Stephen and JavaScout!

The easiest thing would, in my lil mind, be to change
the days order. So it will start with Sunday instead of Saturday.

That is the order in the originating calendar widget, "Core Calendar.exe",
so I believe that changing the day order back to that things will make
the Silica Calendar work correctly.

I have no idea how to go about that kinda feat, so I guess
that JavaScout is the only one who can help out with that.
Reply #12 Top
You are right lilstarfish. The problem is actually with the titles. (dateDay1 through dateDay7)

dateDay7 is actually positioned to be first instead of last.

Making the changes is not hard just a little involved.

Basically you have to reposition dateDay1 through dateDay7.

I will try re-doing the steps and write them down but that will have to be later.
Reply #13 Top
You are right lilstarfish. The problem is actually with the titles. (dateDay1 through dateDay7)

dateDay7 is actually positioned to be first instead of last.

Making the changes is not hard just a little involved.

Basically you have to reposition dateDay1 through dateDay7.

I will try re-doing the steps and write them down but that will have to be later.
Reply #14 Top
Guys - why not look at my calendar (http://martin.wincustomize.com/viewskin.aspx?skinid=131&libid=34&comments=1&SID=37)

I think the Silica Calendar was based on this but missed some items. See if mine works and then look at copying the differences.
Reply #16 Top
What's the problem with Core Calendar?
Reply #17 Top
It`s same problem as Silica cal!But can you advise how to change first day of week?It is now Sun,but I like to use Mon!
Reply #18 Top
Hmm...this is strange...now Core Calendar doesn't work at all here.

Before it worked ok though, correct dates and days.
Then it started but was stuck on september 2000 I believe, couldn't see the year.
But now it won't even start. I've shut down the ghost version it creates a couple of times with Windows Task Manager but it won't start at all.

I even uninstalled DesktopX and reinstalled it but no go...

Very strange..


Update:

I imported the Core Calendar widget into builder and exported it as a new Core Calendar.

Now that copy works.
I wonder why the original widget suddenly wouldn't work.
Reply #20 Top
Ok.

Here are the fixes to the calendars.

For silica Calendar.
The only problem with the silica calendar is that the dateDay1 through dateDay7 are in the wrong positions.
This is causing the day to be incorrect.

Instructions.
Start Desktopx builder
Import the Silica Calendar
From the systray right click on the desktop x builder and click on List Objects
Click on the Object ID column to sort by object id.
Scroll down to the dateDay1 object.
Click on the object and bring up the properties.
Chnage to the summary screen.
Change the alignment on the first alignment button to Align right.
Click ok.
Go Back at the List Objects
Scroll down to the dateDay7 object.
Click on the object and bring up the properties.
Chnage to the summary screen.
Change the alignment on the first alignment button to center.
Click ok.
Go back to the object list and change the X value of the following objects
dateDay1 - 20
dateDay2 - 33
dateDay3 - 52
dateDay4 - 72
dateDay5 - 92
dateDay6 - 111
dateDay7 - 129

Check the calendar to make sure it is working correctly.
Once it is you can go ahead and export the widget.


For the core calendar.
The only problem with this calendar is if you have international setting where the first day of the week is not a Sunday.
There are two possible fixes.
One is to change line 132 on the dateMonthText script as follows which will ignore the NLS and always start the week on a sunday
ulFirstDay = DatePart("w", pFirstDay, 1)

The other solution is to set the week day heading and re-arrange the dateDay1 through 7 obects
The following would be added to the dateMonthText script at the end of the OnEnter function
(line 21)
For ulIndex = 1 To 7
'get the name of the object
szCurObject = "dateDay" & ulIndex

'hide the object if valid
If DesktopX.IsObject(szCurObject) = True Then
DesktopX.Object(szCurObject).text = UCase(Left(WeekdayName(ulIndex,False,0),1)) & mid(WeekdayName(ulIndex,False,0),2,1)
End If
Next

You then would need to re arrange the dateDay1 through 7 ojbects as in the instructions for the silica calendar except with different values of x (You still need to change the align of dayDate1 and dayDate7)

dateDay1 - 27
dateDay2 - 43
dateDay3 - 71
dateDay4 - 96
dateDay5 - 121
dateDay6 - 146
dateDay7 - 170

Hope this helps. Let me know how you get on.


Reply #21 Top
It works now as I like!!!!!!
Thanks a lot to you JavaScout!!!
Reply #22 Top
Wow! JavaScout, you rock!

Many thanks for your thorough walkthrough for the different fixes!!

I just tried your suggestions for fixing the Silica Calendar and
you are right on the money! =D

Now I can use the calendar again, huge thanks!

Ps. for Stephen:

Where JavaScout writes;

"Go back to the object list and change the X value of the following objects
dateDay1 - 20
dateDay2 - 33
dateDay3 - 52
dateDay4 - 72
dateDay5 - 92
dateDay6 - 111
dateDay7 - 129"

...that's the top row in the summary tab.

Just click on the number in that row to change it
to the number JavaScout suggests and the calendar
will soon work ok for you too

*hands JavaScout his softest marshmallows* =D
Reply #23 Top
I've been away a week and I can't believe how much has been written - thank you all.
JavaScout - I've tried your fix. The week now starts on a Monday. By changing the dateMonthText - script line 133 to ulFirstDay = DatePart("w", pFirstDay, 6) I've got the right date displaying under the right day of the week - but my next month still starts a day too early! i.e. 30th April is a Saturday but so is 1st May!
Martin's calendar works well . I've looked at the script but can't see how to alter the Silica script to get it working (but then I'm not a computer genius).
What is so frustrating is that JavaScout and Lilstarfish have correctly working versions and I don't despite doing the same things!
Reply #24 Top
Stephen,

The fix with setting the DatePart to 6 was wrong. The actual problem was the column headings where arranged incorrectly. If you set it back to 0 and re-arrange the columns as described in my April 5th reply everything should be good.
Reply #25 Top
Sorry JavaScout - If I do this the it gives today a Wednesday 9th April (not Saturday). I still have the problem with the first day of the month not following on from the last day of the previous month - should there be a line somewhere saying "first day of month = last day of previous month + 1" or something along those lines.