B4A Library [B4X] AS WheelDateTimePicker - based on ASWheelPicker

This is a date and time picker in IOS picker design.

This library is based on the ASWheelPicker, without it the library will not work.

EQ5gfV8j4u2d3PaEtXi6p57dQCY9h7883CRjIizpVHqLx7YXhY.jpeg

ASWheelDateTimePicker
Author: Alexander Stolte
Version: 1.00

  • ASWheelDateTimePicker_MonthName
    • Fields:
      • April As String
      • August As String
      • December As String
      • February As String
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • January As String
      • July As String
      • June As String
      • March As String
      • May As String
      • November As String
      • October As String
      • September As String
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASWheelDateTimePicker_MonthNameShort
    • Fields:
      • April As String
      • August As String
      • December As String
      • February As String
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • January As String
      • July As String
      • June As String
      • March As String
      • May As String
      • November As String
      • October As String
      • September As String
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • ASWheelDateTimePicker_WeekNameShort
    • Fields:
      • Friday As String
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • Monday As String
      • Saturday As String
      • Sunday As String
      • Thursday As String
      • Tuesday As String
      • Wednesday As String
    • Functions:
      • Initialize
        Initializes the fields to their default value.
  • AS_WheelDateTimePicker
    • Events:
      • SelectedDateChanged (Date As Long)
      • SelectedTimeChanged (Hour As Int, Minute As Int)
    • Fields:
      • mBase As B4XView
      • Tag As Object
    • Functions:
      • Class_Globals As String
      • CreateASWheelDateTimePicker_MonthName (January As String, February As String, March As String, April As String, May As String, June As String, July As String, August As String, September As String, October As String, November As String, December As String) As ASWheelDateTimePicker_MonthName
      • CreateASWheelDateTimePicker_MonthNameShort (January As String, February As String, March As String, April As String, May As String, June As String, July As String, August As String, September As String, October As String, November As String, December As String) As ASWheelDateTimePicker_MonthNameShort
      • CreateASWheelDateTimePicker_WeekNameShort (Monday As String, Tuesday As String, Wednesday As String, Thursday As String, Friday As String, Saturday As String, Sunday As String) As ASWheelDateTimePicker_WeekNameShort
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String
        Base type must be Object
      • getHour As Int
      • getMinute As Int
      • Initialize (Callback As Object, EventName As String) As String
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
    • Properties:
      • Hour As Int [read only]
      • Minute As Int [read only]
Changelog
  • 1.00
    • Release
  • 1.01
    • BugFixes
  • 1.02
    • Add set Hour
    • Add set Minute
    • Add set Date
  • 1.03
    • Add Refresh
  • 1.04
    • BugFixes
    • PickerType = DatePicker - The days in the month now adjust automatically
    • Add Designer Property TextColor
    • Add Designer Property FadeColor
    • Add Designer Property HapticFeedback
  • 1.05
    • Add Designer Property TodayText
      • Default: Today
    • Add get and set TodayText - Call Refresh if you change something
  • 1.06
    • BugFixes
Have Fun :)
 

Attachments

  • AS WheelDateTimePicker Example.zip
    178.4 KB · Views: 138
  • AS_WheelDateTimePicker.b4xlib
    4.8 KB · Views: 20
Last edited:

Unobtainius

Active Member
Licensed User
Longtime User
😍
 

Alexander Stolte

Expert
Licensed User
Update
  • 1.03
    • Add Refresh
Hi, can you clear me a doubt, how do I leave the months in ASWheelDateTimePicker in Portuguese?
yes you can:
B4X:
AS_WheelDateTimePicker2.MonthNameShort = AS_WheelDateTimePicker2.CreateASWheelDateTimePicker_MonthNameShort("J.","F.","M.","A.","M.","J.","J.","A.","S.","O.","N.","D.")
AS_WheelDateTimePicker2.Refresh
 

Henrique Neri

New Member
Hi, is it possible to fix the invalid date error when 02/29 is selected? and the possibility to correct the Background Color property?
 

Henrique Neri

New Member
wich invalid date error?
when selecting the date February 29, it gives an invalid date error.

what about that one?
1661175740548.png

the Background color property does not work, the component is always in black
only if it's possible and it's not too much trouble
 

Unobtainius

Active Member
Licensed User
Longtime User
wich invalid date error?
when selecting the date February 29, it gives an invalid date error.

what about that one?
View attachment 132812
the Background color property does not work, the component is always in black
only if it's possible and it's not too much trouble
For what year?
Youre not forgetting leap years are you?
 

Alexander Stolte

Expert
Licensed User
Update
  • 1.04
    • BugFixes
    • PickerType = DatePicker - The days in the month now adjust automatically
    • Add Designer Property TextColor
    • Add Designer Property FadeColor
    • Add Designer Property HapticFeedback
Needs AS WheelPicker V3.03+

The February 29, 2022 is now no longer be selectable
 

MarcoRome

Expert
Licensed User
Longtime User
it is possible to set it with the current date and time.
I tried with
B4X:
AS_WheelDateTimePicker1.Date = DateTime.Now
but without success
 
Top