Sub dateP_onDateSet(year As Int, monthOfYear As Int, dayOfMonth As Int)
Log($"onDateSet(${year},${monthOfYear},${dayOfMonth})"$)
Dim d As Long
DateTime.DateFormat = "dd.mm.yyyy"
d = DateTime.DateParse(dayOfMonth&"."&monthOfYear&"."&year)
onDateSet(2017,0,12)
yes. just do it...Can just add 1 to the result if needed and I imagine an easy fix?
I can send you the source if you are interested (want to include it in your new lib)
Sub PrefView_Ready (PrefsView As PreferenceView)
[...]
TimePreference = PrefsView.AddSimplePreference("Time", "time1", "Custom TimePicker", DateTime.Time(PrefManager.GetLong2("time1", DateTime.Now)), DateTime.Now)
[....]
End Sub
Sub Time_PreferenceClicked (Preference As Preference) As Boolean
Dim TimePicker As TimePickerDialog
Dim currentTime As Long
currentTime = PrefManager.GetLong2("time1", DateTime.Now)
TimePicker.Initialize("TimePicker", DateTime.GetHour(currentTime), DateTime.GetMinute(currentTime), True)
TimePicker.show("1")
Return True
End Sub
Sub TimePicker_onTimeSet(hour As Int, minute As Int, second As Int)
Dim selectedTime As Long
selectedTime = DateUtils.SetDateAndTime(DateTime.GetYear(DateTime.Now), DateTime.GetMonth(DateTime.Now)+1, DateTime.GetDayOfMonth(DateTime.Now), hour, minute, second)
PrefManager.SetLong("time1", selectedTime)
TimePreference.Summary = DateTime.Time(selectedTime)
End Sub
Only with creating a new library. I´ll not split it up.so is there a way to "remove it" and just to keep only date picker?
No. The underlying library does not have this functionality.is there a way to visualize only minutes and seconds in the TimePicker?
It seems that "MinDate" property in your example is not working well!
date.Initialize("Date",2016,12,3)
Dim cal As Calendar
cal.Initialize("dd.MM.yyyy",cal.GERMAN,"01.01.2017")
date.MinDate = cal
Nor was it my intention to ask of you to do this. I was asking for advice.I´ll not split it up.
Do you mean i could unzip and delete time folder then repack? (ie aar file>>\MaterialDateTimePicker\classes\com\wdullaer\materialdatetimepicker\time\)You can try to remove unneeded classes in the library jar.
Sorry, I was too tired, it is working as expected; forgot to delete.It is working fine for me.
rename x.aar to x.zipDo you mean i could unzip and delete time folder then repack?
OK, but fore anyone else, this is a scaled down version that does not contain the object TIME and is only good if you do not need to set a TIME value... so try not to overwrite something goodYou can post the updated lib here in the thread for any one who want to have the same.
#AdditionalJar: com.android.support:design
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?