I completed modification of XUI views + B4XPreferenceDialog to work with Hijri date picker, I changed their names to avoid conflict with original ones, they are work fine and pick Hijri Calendar ...
BUT
What is the function inside XUI Views>B4XDateTemplate.bas that return the selected date to B4XPreferencedialog prefdateitem after user select day?
I trying a lot of time, I'm confused! I tried Sub SelectDay but with no success!
Have you tried? (from @Erel tutorial on xui views)
B4X:
WaitFor (Dialog.ShowTemplate(DateTemplate, "", "", "CANCEL")) Complete (Result As Int)
If Result = XUI.DialogResponse_Positive Then
btnDate.xLBL.Text = DateTime.Date(DateTemplate.Date)
EndIf
I conclude that Hijri Date can't converted to Long format as Gregorian Date Type.
I think this conclusion applied for other non-gregorian dates.
Use above class for Hijri date picker, then convert it to corresponding Gregorian date.
I am from Pakistan, I used the code mentioned in the link, it works but one problem that it tells me date as 22 / 4 / 1444, where as it should be 21 / 4 / 1444.
I solved it by using this code
Dim Meladi As List = HijriConverter.HijriToGregorian("1444","09","01" )
Label1.Text = Meladi.Get(2) & "/" & NumberFormat(Meladi.Get(1), 2 ,0) & "/" & NumberFormat(Meladi.Get(0), 2 ,0)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.