New in Windows Vista: updates to clock and calendar

Sorting it all Out
Michael Kaplan's random stuff of dubious value
Be sure to read the disclaimer here first!

New in Windows Vista: updates to clock and calendar

  • Comments 31

It was almost nine months ago since I pointed out that The WinForms DateTimePicker and MonthCalendar do not support culture settings.

And there was also the time I talked about Calendars in other languages.

I tried to point out that WinForms was merely wrapping the Shell common controls, which do not support other calendars. So there is nothing to be done.

More recently I posted about how The calendar applet limps along.

I received 17 email responses to these two posts from various people on my team here in Redmond, in Ireland, and from the folks on the Shell team who wondered if I was aware of the efforts to support things a bit more effectively in Vista.

I was! It is just that it was to early to talk about it yet. And the blog entry was about the problem someone was having back then.

Now yesterday, Adam Nathan posted some screenshots from the December CTP on Windows Vista here and he included that little clock/calendar applet, so I thought it might make sense to show one of the exciting capabilities that is in the December CTP build. I suspect Paul Thurrott will be getting to them eventually, too (with the other five pages of screenshots and exhaustive reviews). :-)

If you have access to that build then you can play with the stuff below and enjoy yourself -- if no, perhaps Paul will be covering it in a future set of screenshots on the winsupersite. :-)

There is of course the standard new cool calendar and clock you get when you doublesingle-click on the time as Adam indicated:

UPDATE 12:28pm -- As I just learned from John Murphy (one of those guys in Ireland!), you only need to SINGLE-click to get the flyout to fly out, not a double click....

Now what happens if you change your default user locale to Arabic (Saudi Arabia)?

Wow, it is supporting non-Gregorian calendars! And this is not a fluke, you can try changing to Thai, the Japanese Emporer calendar, or even the Hebrew calendar:

And more!

Clearly the problems described in The calendar applet limps along have been fixed, and they were fixed by making use of the Shell controls, and of course making the Shell controls understand other calendars. In essence, the MonthCal and DateTimePicker controls in the Windows Shell now can support many other calenders -- an awesome feature done with the cross-group work of our team (a little in Redmond and a lot in Ireland -- you folks rock!) and the Shell folks. A much cooler international story, all the way around. :-)

Now does this mean the problems described in The WinForms DateTimePicker and MonthCalendar do not support culture settings are fixed? Well, if you think about it, they may or may not be. Especially when you consider that the WinForms code was written before this feature even existed, it is unclear whether WinForms will be taking the appropriate steps as a control host to change the setting. Definitely something to try on your Vista machine! And something that I can cover later as well.

There is obviously a lot more to this feature and what has been done with it and what can be done with it in Vista, that I will cover another time. There are even other features tucked away and waiting for the explanation in upcoming blog entries.

I may even see if I can get someone (maybe a "guest blogger"?) to say a few words about what it was like to move some of the algorithms that were done in managed code back into the unmanaged world.

But for now, I just wanted to make sure all the people looking at Adam's blog would not wonder whether Microsoft had fixed the "international thing" with that clock/calendar applet -- we did!

In future posts I'll talk about the interactions with the managed controls, some of the other new features, and even more exciting Vista stuff.

And if you have the December CTP build, then start playing with it -- many exciting new features are in there....

This post brought to you by "ฟ" (U+0e1f, THAI CHARACTER FO FAN)

Comment on the blather
Leave a Comment
  • Please add 3 and 2 and type the answer here:
  • Post
Blog - Comment List
  • Everything's localized but the numbers, eh?

    Do Arabic users read numbers left-to-right? Or, to look at it a different way, do they read numbers little-endian?
  • Actually, digit substitution is an overridable setting that varies with the locale -- it is not really being localized so much as that setting, and RTL display is a localization option (and I am on an English system at the moment!).

    I should probably get into some of those issues in future posts, though!
  • Not sure if it is the same question with Maurits, but: do Arabic users have the days going left-to-right in calendars?

    Shoud it be this? I have to check with some natives :-)
    7 6 5 4 3 2 1
    14 13 12 11 10 9 8
    21 20 19 18 17 16 15
    28 27 26 25 24 23 22
    31 30 29
  • That is one of his questions, in fact. :-)
  • Wow. Cool stuff! Great to see the common controls getting updated.

    I must admit, however, I am going to miss the old-school GDI clock that we've had for the past 10+ years.
  • The left to right issue was the first thing I thought of when I saw the screencaps. But, I don't see any examples of arabic calendars on the net... I think I'll change my search language... Ah-ha:

    http://www.maggime.com/arabic/maggicalender.asp
    vs.
    http://www.maggime.com/english/maggicalender.asp?

    They are both the (gregorian?) calendar, constraining the differences to the L2R/R2L issue. I also see a lot of hybrid examples like this:

    http://www.aacps.org/aacps/boe/schol/arab_cal.pdf

    This issue also brings up the sticky issue of localizing/converting between entirely different calendar systems. Just how far does the localization you requested need to go, anyway, Mr. User?

    This could get *really* complicated. Converting appointments between two calendar systems could be a nightmare. I just learned in my googling that dates on the islamic calendar start, not at 'midnight', but at sunset the previous day. How confusing.
  • P.S. Why did the control get so much wider under arabic?
  • Everyone -- I did verify that when I changed the digit substitution from 'context' to 'national' that I got the Hindi digits rather then our Arabic-Indic ones.

    Paul -- Yes, the calendar issue is an unusual one for Bidi -- and the line between the UI language vs. user locale gets very blurred there.

    The width has to do with the width of the text on the control (which ends being based on font info more than anything else).
  • > dates on the islamic calendar start, not at 'midnight', but at sunset the previous day

    Makes sense to me. How do you know when "midnight" is? Sunset is obvious.

    What still blows my mind is that all cultures agree on a seven-day week, especially since there's no corresponding celestial cycle.
  • Hi Maurits,

    Well, there may be places that do not -- but none that are yet supported on Windows!
  • Do you still get a clock and calendar if you single-click on the tray clock and you are not an Administrator?

    Obviously you shouldn't be able to set the time, but I'm going to be seriously annoyed if I get a message box stating "You do not have the proper privlege level to change the System Time" every time I accidentally (or purposfully) click on the time.
  • Hi Matthew --

    In fact, you do get the flyout, you do not have to be an administrator -- the confusion regarding the old behavior was addressed with extreme prejudice (to borrow the terminology of another profession).
  • Hmmm... I'm guessing you need administrative privileges to:

    * Change the date or time
    * Set, change, or delete the NTP server
    * Change the SYSTEM time zone (if such a thing exists)
    * Change the SYSTEM locale settings (if such a thing exists)

    but anyone can:

    * View the date and time
    * Page through the calendar
    * Change the user time zone
    * Change the user locale settings
    * Manually trigger an NTP update, if the server is set
  • Well, there are not yet user time zones, but the rest looks about right. :-)
  • Is there a list? I mean are the Indian calenders supported as well?
Page 1 of 3 (31 items) 123