This is late, but man you are LEGENDARY. The fact you managed to explain everything so fast while making it as easy and understandable as possible is incredible! Definitely a gem for newer developers :o.
Thanks. I do tend to keep the pace up on programming tutorials. But I figure if you miss something you can allways scrub back 🙂 0.75 speed is an option aswell. Personally I do not enjoy watching some one elses code compile 😆
@@CodeWithCal I appreciate the format so much more. I usually speed up videos automatically out of habit. I'm giving this a try tonight in my app. Do you know (out of curiosity) if this would allow me to do this on two dates in one activity? I need to set start and end dates in an activity and can't seem to get date pickers to work when there's more than one date picker needed.
In the initial activity I would format the date into a string. Then pass the string via Intent putExtra. In the second activity getExtra for string you passed, then convert back into a date using the same formatter. Heres a good article on how to use putExtra/getExtra. stackoverflow.com/questions/5265913/how-to-use-putextra-and-getextra-for-string-data
I have a video on SQlite ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4k1ZMpO9Zn0.html. To store a date you want to convert the date to a string using a date formatter then store in db as string then when you fetch use the same formatter to convert the string back into a date. Something like: SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
Great tutorial, very helpful. Is there a way to change the format to dd/mm/yyyy? like the date of birth form field and how can I set the date picker to begin from the current date instead of 1900 so the user doesn't have to scroll all the way to 1988 for example please thank you
Sir if we are implementing two date pickers say d1 and d2 Now we select date for d1 For d2 we have to disable the date of d1 and all the dates before d1 date ....plz help me out how to do thiss I know i have to implement set mindate in d2 and pass d1 in it but i am unable to do so bcz setmindate takes long and i am unable to convert the date of d1 to long plzzz help me out really need to get this done for my final project Waiting for your kind reply thank you...
I followed your tutorial and it worked perfectly. but now I need to check if the datePickerDialog is empty or not. can you help me with that? thank you.
@@CodeWithCal Yes it worked! Thank you. I want to ask about one more thing if you don't mind. how can I check if the date is current or old? I need an if statement that will do two different things depending on the date.
super late on this, but I just did it in a Fragment and got an error about the context part. If this is the case, you need to change from "Context:this" to getContext()
Firebase tutorial in on the to do list. How ever in the mean time I'm not sure that firebase stores dates easily I would convert to a string store on firebase and then turn it back into a date after you pull the value again. Hope that helps 🙂
@@CodeWithCal yes I have found one solution but not about setting the maximum day, it was about finding the future date. Did you make any video about finding the future date from the day selected?
You are right, 100% plus a switch would probably compile faster. How ever I don't particularly like the syntax of a java switch. My silly personal preference.
Hey, instead of all the if statements for month names you could simply set another calender object. Pass in month int you get as calendarobject.set(Calendar.MONTH, intformonth); . Then you could have used getDisplayName with SHORT as the second argument to have gotten the shorthand name of the Month. String monthname = calendarobject.getDisplayName(Calender.MONTH, Calendar.SHORT, Locale.US).to string();