By default TMonthCalendar shows date in the format that is set in Windows control panel (Short Date). I want to override this setting and force TMonthCalendar to always display my format regardless of Windows setting. Is it possible ?
As far as I know, you can not change the date format settings of TMonthCalendar.
The reason for this is the fact that TMonthCalendar is actually just a wrapper around a calendar API from the OS. That is why not only is the date format in the form that is set in OS regional settings, but the whole look of the calendar matches the look of the OS on which you are running your application on.
So, I'm afraid you will have to look at some third party components for this. For instance, TMS Software has several calendar and date-time picking components as part of TPlannerCalendar.
No, this control is a wrapper for the native Month Calendar Control. As the documentation states:
The month-calendar control gets its format and all strings from
LOCALE_USER_DEFAULT.
Related
Currently the datepickers trigger the default iOS datepicker with dd-mm-yyyy format. I would like it to trigger the dddd-dd-mm-yyyy format so users are better at picking the correct date because they can see the actual day of the week.
Is this possible for a mobile website?
I'm not sure about doing it for mobile website. But we can change format of default iOS date picker if you want. It's directly not possible through date picker. There is another component called UIPickerView in iOS, through which we can achieve this. Check how to create UIPickerView for mobile website and place the values you want in pickerView.
So after doing more research on the subject I have found that it is possible to use datetime-local. This triggers the native datepicker with ddd-dd-mm format but also accounts for the year (so scrolling over december 31 will make the date object move to the next year). This workaround has issues with IE though, so is not a universal solution.
I want to get the browser specific timezone names (different browsers displays different text for each system setting) for system available time zones. I need the exact string of the timezone that are in the "()" when writing console.error(new Date()) but not just for my current settings, without changing my OS settings and restarting the browser each time.
AFAIK js libraries uses their own name lists to solve this but the resulting names are different from the browser timezone name. I need the name as the browser will write it.
Thanks.
It was not possible when the question was asked, but with the Intl.supportedValuesOf it is possible in modern engines:
console.log(Intl.supportedValuesOf('timeZone'));
At the time of this writing, you can ask for "calendar", "collation", "currency","numberingSystem", "timeZone" and "unit".
Intl.supportedValuesOf('timeZone') now provides the list of all available timezones on some browsers, including Safari and Chrome for iOS caniuse.com.
I am sending date through g:datePicker as Eastern time by default.
How do I have an option where i pass date based on the timeZone selected?
Please help.
Grails datepicker tag does not and should not deal with your timezone. Its just a presentation of date and accepts Date object. Meaning that whatever timezone the date object has it will be that.
There are number of libraries to handle timezone on client side such as ECMAScript Internationalization API, moment.js and many others. On the server side you have libraries such as Joda-time and so on. I am sure if you search on Google you can find plenty more options.
Just handle your timezone conversion, then the presentation layer could be Grails datepicker or bootstrap-datepicker or jquery and etc.
I use input type "date" with jquery mobile. But for each device it display different result.
+ Android operating system: choose input date the same type of android calendar
+ iOS: choose input date date the sam type of iOS
+ Desktop: choose input date the same type of operating system install on desktop
I want display dd/MM/yyyy format standard for all device. How to custom format default input date???
Thank you so much!
You can do this, but this is too much of a waste of time and involves cumbersome use of HTML5's localStorage api. For more info, look at this question. In this case also, it's not possible to make type=date behave uniformly in all browsers because each browser handles this differently and you don't have any control over it.
HTML5's standards indicate usage of YYYY-MM-DD format but the browsers sniff your local date format and use that. See this from w3:
The format used "on the wire", i.e. in HTML markup and in form submissions, is intended to be computer-readable and consistent irrespective of the user's locale. Dates, for instance, are always written in the format "YYYY-MM-DD", as in "2003-02-01". Users are not expected to ever see this format.
and this question at jquery Mobile site.
All this must tell you that doing this will take a lot of effort from you. Instead, it would be better if you use some other alternative to this, taken from this question like this : http://jsbin.com/ukelis/1/edit
you could change the dateformat in the altFormat option in the JS and make this work for you. You could also look at this - a mobile version for jquery UI's datepicker.
I have an app that relies heavily on date calculations. I am using NSCalendar and doing all the calculations "the right way", but I don't really have any way to test any other calendar besides the default US one.
How can you change the calendar used on iOS? Where can I find more information about calendar alternatives?
You can simply change it on your Device/Simulator. Open Settings -> General -> International. Here you can change the format of the calendar date or the calendar itself.