Ionic 2 Datetime Change Date Region - ionic-framework

I want to use Ionic 2 Datetime component in my application But my problem is the target date format is not gregorian and it's Jalali(persian) date format. So I wondering that if any way to change the region of datetime. I wrote a service for change gregorian date to jalali but I don't know that is it possible to change datetime to work with this or not.

Have a look at the library moment js, it seems to have a plugin with the calendar kind you look for, see here. And for the display of the picker, maybe if you use the native datepicker plugin, you'll have a correct display of your calendar (assuming those are managed by android or ios).

Related

Flutter set date of InputDatePickerFormField programmatically

The InputDatePickerFormField is a widget that presents a TextFormField and allows the user to enter a date manually as a string. This is fine and works great on its own (although I can't find a way to set its date format to dd/mm/yyyy instead of the default mm/dd/yyyy).
I want to also give the user the option to choose a date from the datePicker UI, but that means capturing the selected date from the picker and then programmatically setting this date to the form field. The InputDatePickerFormField class does not expose its controller for setting the string on the field, and there are no public methods for doing so.
Does anyone know of a way to do this?
In the Flutter documentation is written
When the field is saved or submitted, the text will be parsed into a DateTime according to the ambient locale's compact date format.
It means it is formatted automatically after the date change. The "the ambient locale's compact date format" is automatically determined from user device settings. You can set supported localization at the app level as described here. You can play with user device localization in Chrome to verify it is working properly (the first language is used for app localization). .

sap.m.PlanningCalendar - How to display hour in 24-hour format?

I am using a planning calendar where I am displaying the appointments. I am showing the calendar from 7AM to 5PM. But I want the Hour format to be in 24-hour format, like after 12PM it should be 13, 14, 15.. likewise.
It seems like hour format for planning calendar depends on browser locale. For example for me (Europe, Poland) hours are in 24hours format.
It is related to Launchpad settings:
You can set it default in transaction SU01 tab defaults for selected user or You could do massive change in SU10. If You need more information You could find it in 2404186 SAP Note launchpad.support.sap.com/#/notes/0002504186
It's not the most ideal answer, but the 12/24 can be influenced by the locale. For example, adding the URL parameter sap-locale=ES (or sap-language) would use the 24 hour setting because that's how the locale is defined. You could also do it by calling:
sap.ui.getCore().getConfiguration().setFormatLocale()
before rendering with a locale (as string) which uses 24hr.
It may be possible to extend locales to have a special one that has a 24hr format, but the rest of the settings being the same, but I couldn't find any examples of how to do this, and it's not immediately apparent to me.
edit: if English is necessary, locales such as "en_GB", "en_IE" or "en_ZA" may be used.
That doesn't work for us, my Fiori launchpad is set to 24hr as well as in SU01 backend system, but the Planning Calendar still shows 12PM.
Any other suggestions?

Arabic/Hijri DatePicker for Angular 6

I am searching for a Datepicker in Angular 6 which has the ability to show Arabic Date based on Hijri Calendar.
Can't seem to find one. Is there something available or we need to build it from scratch.
Ng bootstrap or bootstrap for angular has a date picker that supports Hijri dates and other dates formats. You can look into the link below.
https://ng-bootstrap.github.io/#/components/datepicker/calendars

How I can customize a datepicker in Sulu?

Are there any methods to customize datepicker in Sulu via XML page config (e.g. I need to change date format)?
Sounds trivial, but http://docs.sulu.io/en/latest/reference/content-types/date.html says "No parameters available."
I am afraid to tell you that this is currently not possible... It would be nice if you create an issue on github also explaining the parameters you'd like to have.
And apart from that, the date format is based on the user language, so if the user has english as UI language he also gets the english formatted date. On the website you can use e.g. the date twig filter to format the date however you like.

Zepto Datepicker Library

I've decided to ditch jQuery and go with Zepto for a mobile application that I am making with PhoneGap.
The problem is that most of the date pickers available rely on jQuery (Including the one I was using before). http://xdsoft.net/jqplugins/datetimepicker/
Does anybody know any good date pickers that work with zepto. The only requirement is that it looks OK.
I have successfully implemented http://trentrichardson.com/ but the UI is awful and I haven't found any documentation on how to change it from using dropdowns to a standard calendar view.
I have also used the following date picker but it seems limited in that it completely takes over the input you're using and I'm not sure how to get the input to display the date once it's been selected. https://gist.github.com/pamelafox/1765620
Any suggestions are appreciated! Thanks.
This one appears to be working with zepto only :)
(or at least the demo includes zepto only ;) ... (with the DateFormat library, but it's optional))
http://blog.pamelafox.org/2012/02/datepicker-for-twitter-bootstrap.html