Question

I'm looking for a calendar control (AKA date-picker) that works on mobile devices. The problem is most devices are without JavaScript, or with poor JavaScript support.

ASP.NET's built-in control uses JavaScript to do post-backs. ASP.NET has a mobile calendar control, but it isn't fully localizable (on low-end devices where it displays a step-by-step date picker, its buttons are always in English).

I am thinking of overriding the built-in calendar control to replace the JavaScript post-back directly with parameterized links.

My compound question is -

Is there a good JavaScript-less calendar control, of a way to get rid of JavaScript in ASP.NET's built-in control, or of a way to localize ASP.NET's mobile calendar control?

If all of the above doesn't exist, is replacing the post-back with parameterized links a good way to go? What would other suggestions be?

Currently, I'm not concerned with formatting - the device I'm targeting displays the date-picker well. I'm concerned only with the small problem of getting it to work...

Was it helpful?

Solution

What I ended up doing is building a custom calendar control.

For now, I used a table, but it will have to change when I want to support more devices. Since I'm targeting right-to-left languages, a table is already a pain.

@troelskn - I didn't go for <select> because they're not comfortable for a user using a mobile device, but thank you for the advice.

OTHER TIPS

You can generate some dropdown (<select>) boxes and use them as a simple datepicker. You'll need to do some server side validation though, since no JavaScript would mean that the user could pick an invalid date (for example, 31st of Feb).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top