Hi,
yes its true there is no DateTimePicker-control in Jabaco afair because Java swing does not have one.
but there is a Calendar and a GregorianCalendar-class in java#util.
you can either dig the internet until you find something that fulfills your needs or you could do a bit work an do it yourself in Jabaco
could you please let us know what you have chosen?
only some points you could start from:
|
Jabaco Source
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
Dim MyCal As New java#util#GregorianCalendar
Public Sub Form_Load()
Command1.Caption = "<"
Command2.Caption = ">"
Timer1.Interval = 1000
Timer1.Enabled = True
Label1.TextAlign = fmTextAlignCenter
UpdateLabel
End Sub
Private Function DaysInMonth(year As Integer, month As Integer) As Integer
'can this be useful?
Select Case month
Case 1, 3, 5, 7, 8, 10, 12: DaysInMonth = 31
Case 2: DaysInMonth = IIF(MyCal.isLeapYear(year), 29, 28)
Case 4, 6, 9, 11: DaysInMonth = 30
End Select
End Function
Private Sub UpdateLabel
'MyCal.getTime actually delivers date and time
Label1.Caption = MyCal.getTime.toLocaleString
End Sub
Public Sub Command1_Click()
'ein Monat zurück
MyCal.add(Calendar.MONTH, -1)
UpdateLabel
End Sub
Public Sub Command2_Click()
'ein Monat vor
MyCal.add(Calendar.MONTH, 1)
UpdateLabel
End Sub
|
greetings
OlimilO