date-format in mobile calendar control ?

K

Koen Hoorelbeke

Hi there,

I have a calendar control on a mobile page (phone). Since the phone can't
display the control it shows different pages and manners to select a date
(pretty cool). However, all my dates are showed in mm-dd-yyyy format, where
it should be dd-mm-yyyy (CultureInfo : "nl-NL").

Now, when you choose to 'type a date', you get in the display: "Type a date:
(MMDDYYYY)" and then the texbox where you should enter the date (with
default current date as f.e. 11152003).

It should show like : "Typ een datum: (DDMMYYYY)" (the dutch translation,
I'll do myself if possible) and textbox with default entry: 15112003.

And it should also accept this entered date as a date with format ddmmyyyy
(otherwise I'll get an error on 15112003).

How is this possible.

Many thanks in advance.

Greetingz,
Koen Hoorelbeke.
 
M

MSFT

Hi Koen,

Thank you for the post. Currently I am try to find someone to assist you on
this issue and will update in the newsgroup soon.

Regards,

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
E

Earl Beaman[MS]

Hi Koen,

The way to get the calendar to accept different formats is to set your
culture to dutch.

Here is a c# example of how to do this:

using System.Threading;
using System.Globalization;

private void Page_Load(object sender, System.EventArgs e)
{
CultureInfo ci = new CultureInfo("nl-nl");
Thread.CurrentThread.CurrentCulture = ci;
Calendar1.CalendarEntryText = "MYTEXT";
}


This will set the format to the dutch format.

For the other question, I am researching the issue. The strings you see
"Type a date" are localized, but I need to find out what languages this
section is localized in. The CalendarEntryText property only applies to
the opening screen unfortunately.

So, I will reply to this post and let you know when I find out.

Thanks,
Earl Beaman
Microsoft, ASP.NET

This posting is provided "AS IS", with no warranties, and confers no
rights.
 
K

Koen Hoorelbeke

So, I need to install this on the server, or just on my development station
? If I need to install it on my server, does it effect the working of other
applications ? I mean, will I still be able to get it in English then ?

Tx in advance.

Greetingz,
Koen.
 
E

Earl Beaman[MS]

Hi Koen,

I'm not sure. I will have to run some tests to find the answer.

Thanks,
Earl
 
E

Earl Beaman[MS]

Hi Koen,

Here is the answer for you!

You can just install the regular english 1.1 framework on your server.
Then download and install the langpack.
The startpage for the langpacks is
http://www.microsoft.com/downloads/details.aspx?familyid=04DBAF2E-61ED-43F4-
8D2A-CCB2BAB7B8EB&displaylang=en

Then change the language in the dropdown on the right side of the page.

Now you will have both english and dutch messages.
To utilize dutch, you will need to change the currentculture and
currentuiculture to dutch.

The date format is governed by Thread.CurrentThread.CurrentCulture, while
the message ("type a date" or "Type een datum") language is governed by the
Thread.CurrentThread.CurrentUICulture.

Hope this helps,
Thanks,
Earl Beaman
Microsoft, ASP.NET

This posting is provided "AS IS", with no warranties, and confers no
rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top