Тёмный

Pop Up Date Picker Android Studio Tutorial 

Code With Cal
Подписаться 10 тыс.
Просмотров 75 тыс.
50% 1

Опубликовано:

 

23 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 111   
@CodeWithCal
@CodeWithCal 2 года назад
Time Picker Tutorial ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-c6c1giRekB4.html
@tanishranjan
@tanishranjan 3 года назад
Finally found someone who could explain things nice, easy and fast. New age software developer on RU-vid!!!!
@ConscriptReporting
@ConscriptReporting 5 месяцев назад
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.
@JoshMartin
@JoshMartin 3 года назад
Well that was fast and fun! This is great!
@CodeWithCal
@CodeWithCal 3 года назад
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 😆
@JoshMartin
@JoshMartin 3 года назад
@@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.
@CodeWithCal
@CodeWithCal 3 года назад
I don't see any reason why not so long as you create two of everything. :)
@JoshMartin
@JoshMartin 3 года назад
@@CodeWithCal You're the best... I got this working perfectly. So much easier than everything else I was finding. Thank you thank you thank you!!
@furkankuse6082
@furkankuse6082 3 года назад
Thanks a lot, best tutorial about this topic! Can't wait for upcoming tutorials!
@CodeWithCal
@CodeWithCal 3 года назад
Thanks 😊
@river_fieldnotes
@river_fieldnotes 2 года назад
One of my goals is to work and do things as fast as you did with this! You make it look so easy :D
@CodeWithCal
@CodeWithCal 2 года назад
Thanks, It's important to remember I had the luxury of editing this video haha :)
@rocketfortune
@rocketfortune 3 года назад
Hey, your code and tutorial are very helpful. But I have question though, how do you pass the value of Date to another activity?
@CodeWithCal
@CodeWithCal 3 года назад
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
@siddharthsingh420
@siddharthsingh420 3 года назад
Awesome!! Really Appreciate your work. Thanks for sharing!
@CodeWithCal
@CodeWithCal 3 года назад
Thank you 😊
@Xsaberxan
@Xsaberxan 3 года назад
Great tutorial! Is there any way to have the date picked be stored in an SQlite database on the app?
@CodeWithCal
@CodeWithCal 3 года назад
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");
@antala77
@antala77 2 года назад
I put the initialization before setContentView(R.layout.activity_main3); witch cause the problem. Now its works. Thank you!
@stevenchoong2982
@stevenchoong2982 10 месяцев назад
Thank you for this tutorial, God bless you
@niphomahlangu2733
@niphomahlangu2733 Год назад
Thank you so much for the great tutorial. Was very helpful.
@alihayavi1173
@alihayavi1173 2 года назад
Not Fast, Supper Fast, Than You Bro, Gold bless You.
@0001-exe
@0001-exe Год назад
amazing tutorial! i do have one problem. my pop up datepicker thingy is in calendar form, how do i make it into a spinner form?
@adoptedpotato4132
@adoptedpotato4132 3 года назад
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
@CodeWithCal
@CodeWithCal 3 года назад
You can definitely set the default date on the date picker. As far as changing the format of the date picker itself, I'm not too sure.
@mateenmehmood5675
@mateenmehmood5675 2 года назад
Thanks man. I got confuse while debugging why month is always one point less. Thanks for the tutorial
@CodeWithCal
@CodeWithCal 2 года назад
Programming counting always starts at 0. Months start at one. It can be a tricky thing to remember. Glad you liked the tutorial.
@abhijithcj2166
@abhijithcj2166 2 года назад
very useful brother
@ricardo130695
@ricardo130695 2 года назад
Thank you.
@talhac2796
@talhac2796 3 года назад
DatePicker doesn't work on spinner mode. How can i change it? Can anybody help me?
@meetable2657
@meetable2657 3 года назад
found out?
@assassinhitman
@assassinhitman 2 года назад
New API doesn't allow unless you set up XML and the appropriate attributes.
@brainy3429
@brainy3429 2 года назад
Thanks a lot. Really useful :)
@mrestrella4
@mrestrella4 Год назад
So good!!!! Thanks!!!
@Michael.Haddad
@Michael.Haddad 2 года назад
nice video! is there any way i could take the date they selected and use it?
@CodeWithCal
@CodeWithCal 2 года назад
Yeah absolutely, you have the date in the on date set function that's overridden :)
@sagarsaini6028
@sagarsaini6028 2 года назад
Thanks Man for helping...and for providing code too
@CodeWithCal
@CodeWithCal 2 года назад
You're welcome!
@joshoxy
@joshoxy 2 года назад
How do I add an on click listener to the ok button of the datepicker ?
@CodeWithCal
@CodeWithCal 2 года назад
Good question, there is probably an override method, did you find a way?
@brianlin5436
@brianlin5436 Год назад
really helpful tutorial
@antala77
@antala77 2 года назад
do not work on getDateToday errror java runtime error. Why ?
@songvuisongkhoe-h8p
@songvuisongkhoe-h8p 11 месяцев назад
How to get Year after selecting
@carpinchoConLentes
@carpinchoConLentes 2 года назад
Nice tutorial bro. But I want to change the background color of the button, how can I do it?
@CodeWithCal
@CodeWithCal 2 года назад
Buttons have a setter for color. Of the top of my head it's either set tint or set background or something like that
@syahidanarrizaldysidik4226
@syahidanarrizaldysidik4226 3 года назад
hi, thank you for sharing :)
@CodeWithCal
@CodeWithCal 3 года назад
You're welcome
@rabbiaanjum9184
@rabbiaanjum9184 3 года назад
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...
@anikettikariha8066
@anikettikariha8066 3 года назад
Cal thanks for the video ...
@reyzaikhu1384
@reyzaikhu1384 2 года назад
Thank you!
@sadeemshehri2748
@sadeemshehri2748 2 года назад
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
@CodeWithCal 2 года назад
I think you can just say if datepickerdialog == null But maybe I misunderstood the question..
@sadeemshehri2748
@sadeemshehri2748 2 года назад
​@@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.
@rocioev7338
@rocioev7338 Год назад
Works awsome, thankss
@ktt242
@ktt242 2 года назад
Can we gate same output in koltin plz code
@pgenga2010
@pgenga2010 2 года назад
Very well thanks... How can I do this on a Fragment class ... I am getting errors
@CodeWithCal
@CodeWithCal 2 года назад
I think you can do it in a fragment. Although I haven't tested. What errors are you getting?
@YungJoonas
@YungJoonas 2 года назад
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()
@vladislavpesterev1137
@vladislavpesterev1137 2 года назад
Thank you very much, friend
@CodeWithCal
@CodeWithCal 2 года назад
🙂
@mdfaizanyt
@mdfaizanyt Год назад
how did you copy down all above code @3:07
@CodeWithCal
@CodeWithCal Год назад
In post ;)
@kushwahasiddharth7982
@kushwahasiddharth7982 3 года назад
Really useful brother 😊 but i need to store the date into firebase real time database can you help?
@CodeWithCal
@CodeWithCal 3 года назад
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 🙂
@meetable2657
@meetable2657 3 года назад
hey man, I literally git cloned your repository and ran the application and my calendar is not a spinner but...a big calendar....why?
@CodeWithCal
@CodeWithCal 3 года назад
Have you applied the style? Default style is not a spinner :)
@meetable2657
@meetable2657 3 года назад
@@CodeWithCal yep. the problem was that i was testing it on android api 24
@tanvirprogrammer3194
@tanvirprogrammer3194 3 года назад
Thank you so much...
@sudarshanakonwar3458
@sudarshanakonwar3458 3 года назад
Sir.. Can you show the firebase part with real-time database along with this part
@CodeWithCal
@CodeWithCal 3 года назад
Firebase is on the to do list :)
@danielmckarpqwer848
@danielmckarpqwer848 3 года назад
how should I save the date in a "Save btn" later send to my email ?
@CodeWithCal
@CodeWithCal 3 года назад
You can send emails via intent. www.javatpoint.com/how-to-send-email-in-android-using-intent
@לינויעוז
@לינויעוז Год назад
thank you!!
@ndhambi
@ndhambi 2 года назад
Thank you
@afreensworld786
@afreensworld786 2 года назад
need added any dependency for this for this project
@CodeWithCal
@CodeWithCal 2 года назад
No none needed
@afreensworld786
@afreensworld786 2 года назад
it showing only the current date, How to show future date
@CodeWithCal
@CodeWithCal 2 года назад
Initially show a future date?
@amiraummi3003
@amiraummi3003 2 года назад
how about to set maximum day from the date selected?
@CodeWithCal
@CodeWithCal 2 года назад
You should be able to feed the selected date back into the date picker as a max date. Did you find a solution?
@amiraummi3003
@amiraummi3003 2 года назад
@@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?
@CodeWithCal
@CodeWithCal 2 года назад
No I don't have any other vides on this topic. Glad you found a solution though :)
@shainaberonio7485
@shainaberonio7485 3 года назад
when i open my activity it keeps on crashing, what to do?
@CodeWithCal
@CodeWithCal 3 года назад
Have a look in the console see what errors or exceptions are being thrown and google them 😆🙂
@entertianmentsabaysabay2684
@entertianmentsabaysabay2684 3 года назад
can u make video about render UI ?
@CodeWithCal
@CodeWithCal 3 года назад
Looks like it's a javascript web technology. I try and stick to app development on this channel for now anyways. Thanks for the suggestion though.
@entertianmentsabaysabay2684
@entertianmentsabaysabay2684 3 года назад
I speak about android. example dynamic add view in linearlayout and another brother, thank you
@chicskind3379
@chicskind3379 3 года назад
keeeep it uuuuup ;)
@Wiikend
@Wiikend 3 года назад
3:00 This is when you go for a switch statement instead of endless if's. :)
@CodeWithCal
@CodeWithCal 3 года назад
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.
@Wiikend
@Wiikend 3 года назад
@@CodeWithCal They work exactly the same, so personal preference is no problem here I guess :)
@rezabmn5683
@rezabmn5683 3 года назад
hi can you make video about use subtitle in video? THX.
@CodeWithCal
@CodeWithCal 3 года назад
Hi, not sure what you mean by subtitle in video?
@rezabmn5683
@rezabmn5683 3 года назад
@@CodeWithCal i mean caption, how add caption to videoview or exoplayer
@CodeWithCal
@CodeWithCal 3 года назад
Cool idea, I'll take a look and if I can come up with a good solution hopefully I can make a video :) thanks for the suggestion
@rezabmn5683
@rezabmn5683 3 года назад
@@CodeWithCal for non English user it's a great tool and education
@mo.downhill6760
@mo.downhill6760 2 года назад
Thank you, but you are so fast..
@adithyapk6299
@adithyapk6299 3 года назад
Soooo slow...🧐🧐🧐
@assassinhitman
@assassinhitman 2 года назад
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();
@CodeWithCal
@CodeWithCal 2 года назад
Yeah that is probably a more elegant solution 😊👍
Далее
Calendar App Example Android Studio Tutorial
9:32
Просмотров 113 тыс.
How to win a argument
9:28
Просмотров 560 тыс.
НОВЫЙ РОЛИК УЖЕ НА КАНАЛЕ!
00:14
Просмотров 312 тыс.
Why Are Open Source Alternatives So Bad?
13:06
Просмотров 640 тыс.
RecyclerView Item Click | Best Practice Way
8:06
Просмотров 94 тыс.
؟ Docker ليه بنستخدم 💙
18:52
Просмотров 77 тыс.
How to Implement DatePicker in Android
6:55
Просмотров 2,9 тыс.
Bottom Navigation Bar With Badges - UX With Material3
13:17