Sub txtData_Click()
Dim Dd As DateDialog
Dim ret As Int
' set the date shown when the dialog is openend
Dd.DateTicks = DataOdierna
ret = Dd.Show("Select a date", "Date", "OK", "", "Cancel", Null)
If ret = DialogResponse.CANCEL Then Return
txtData.Text = DateTime.Date(Dd.DateTicks)
' save the selected date, so it can be shown again
DataOdierna = Dd.DateTicks
End Sub
'This label is declared in sub
Sub txt_DataConsegna_Click()
Dim Dd As DateDialog
Dim ret As Int
' set the date shown when the dialog is openend
Dd.DateTicks = DataOdierna
ret = Dd.Show("Select a date", "Date", "OK", "", "Cancel", Null)
If ret = DialogResponse.CANCEL Then Return
txt_DataConsegna.Text = DateTime.Date(Dd.DateTicks)
' save the selected date, so it can be shown again
DataOdierna = Dd.DateTicks
End Sub