For real dude. He talks over a sped up recording of him coding, so there's no way to keep up all. I just watch the video now to see how it's executed then write it myself
Thank you so much for this tutorial!!!! Everything was so easy to understand😍. I was struggling with making calendar and your video literally saved me. Thank you so muchhh!!!
assume i would to show all days that have event with gray backgound. Example 28,29,30 have event so in calendarview day 28 29 30 should have gray background. Do you have any idea to do that?
Thank you for your Android Studio tutorials! Why when in the adapter add code: if(date.equals(CalendarUtils.selectedDate.now()) holder.dayOfMonth.setTextColor(Color.RED); Then the text of the current date is not highlighted in red? Please tell me my mistake.
Hi I have managed to do your tutorial. The applications runs, however when I select the Weekly Text on top my application crashes. Can you please help with this issue?
Hello Cal, Very useful tutorial for me. I have one question here, which is how we can add total number of event count inside calendar date or changing background color of specific date. Please suggest me.
Hi, thanks for the tutorial. I'm a newbie and this helped me a lot. Did you happen to leave out the "delete" event button from this tutorial on purpose?
Hi, Yes I did trying to keep each tutorial as short and to the point as possible. If you are interested in persistent events check out this SQLite database tutorial. ruclips.net/video/4k1ZMpO9Zn0/видео.html
hi, may i know if it possible for me to start my coding with this video instead of the monthly calendar video? because my desired app does not need the monthly view, it should start with weekly to daily.
Is the date null when you are calling date monthyearfromdate? I would put in a break point, before this method is called and see the state of things. For a long time I ignored debug mode and breakpoints. But they really can save so much time.
Hey, Cal.. First of all, thanks for this amazing tutorial. I have a question: how do you pass this code into a fragment? I am having a problem with the code below; it's in setWeekView() fun in the Week Activity but when trying to pass into my fragment I don't know how to pass in the second value. CalendarAdapter calendarAdapter = new CalendarAdapter(days, this); As I have been seeing, the second parameter in that function/class is CalendarAdapter.OnItemListener so I don't understand why you passed this into the second parameter. Thanks in advance!
When he built the class, he implements OnItemListener, making the object an OnItemListener. So when he passes in this, its passing in the object which is itself an OnItemListener. Applying this to fragments is quite simple. You implement OnItemListener to the fragment and pass the fragment as an argument.
I wanted to add a feature where the days that had events listed under them would be annotated/highlighted in some way to let users know that there are events on those days. Any suggestions?
Hi cal I'm making a calendar with the video you uploaded. I want to change the date to Red when the event is added. I tried to do it in the same way as selected day, but it didn't work out. ArrayList dailyEvents = Event.eventsForDate(CalendarUtils.selectedDate); ... If (dailyEvents.size()>0){ //make red} all dates change to Red. I think we need to get information on the date the event was added, but there's no progress
hey, im facing some issue..the dates in the main activity layout are not visible..everything else the weekdays are visible and the previousweek and nextweek buttons are working fine..just the dates are not visible
Hmm could be a number of things, double check your xml and if you don't see anything off in there try putting a break point in the adapter and check why date textview is not being populated.
Hi, really nice video, I have succeed to create the calendar, but have question, how if I would like to put the selectedDate as intent and bring it to another activities? tries to convert it to string but not worked, can you help me?
You should be able to convert the date to a string using a dateformatter. Then as long as you use the same date formatter when converting the string back into a date on your next intent. In short you are on the right track.
Thank you for the video. There was no error in the code I made. But only the day of the week came out and the date didn't come out. How do I solve this?
Hey, Sure thing. In the OnBindViewHolder Similar to how we change the background color if the date equals selected date. Do a check if date equals todays date if so change text to what ever color. :)
Yeah it is fairly easy to convert. kotlin is based on java. And if you copy paste java code into your kotlin project Android studio will even try and do the conversion for you. Worth checking though because auto converted code doesn't allways work out.
@@rahmataulia Could you convert the code in Kotlin? I tried but I am having problems with Calendar Adapter because I am using the Calendar inside a fragment not in an Activity.
I think you can use a different date formatter. If you Google local dateformatter you should be able to see all the different combinations of date formatters you can use
You can absolutely! You just won't have access to LocalDates which have a lot of convenience methods. But you can use just a regular dates. your methods will need to be a bit longer as there is a little more logic you will have to be responsible for
Sir I was following your date picker toturial i have a querry plzzz help me out really need this help plzz 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...
Hello, Set min date shouldn't take a long time. So I think you are close. When d1 is set, set d2 min date to be d1 plus one day. Also I don't think you need to convert the date to a long.
@@rabbiaanjum9184 Apologies you do want to pass a long. create a Date object from day month and year as described here: stackoverflow.com/questions/16499228/creating-java-date-object-from-year-month-day Then you can do something like this: datePickerDialog.getDatePicker().setMinDate(dateObject.getTime());
@@CodeWithCal sir if you have time plz look into my pblm i really need to sort this out as i have my final demo in one day I would be really thankful tou you sir ..
Daily Calendar
ruclips.net/video/Aig99t-gNqM/видео.html
first time i'm using 0.75x speed on youtube
For real dude. He talks over a sped up recording of him coding, so there's no way to keep up all. I just watch the video now to see how it's executed then write it myself
same here
Damn i was thinking to comment down the same but then u thought it would be rude but I'm not alone who thinks he's way too fast
Thank you so much for this tutorial!!!! Everything was so easy to understand😍. I was struggling with making calendar and your video literally saved me. Thank you so muchhh!!!
You are most welcome ☺️
Hey,
Nice Explanation. Thank you!
Is there a way to set a color for the day once I added an event?
Yes. The day view is all controlled by the adapter. So add a conditional there to change the BG color :) or something like that
how can i only keep the weekly view? i don't need the monthly view for my current project. please help me, Ive been trying since few days :')
assume i would to show all days that have event with gray backgound. Example 28,29,30 have event so in calendarview day 28 29 30 should have gray background. Do you have any idea to do that?
Thank you for your Android Studio tutorials! Why when in the adapter add code:
if(date.equals(CalendarUtils.selectedDate.now()) holder.dayOfMonth.setTextColor(Color.RED);
Then the text of the current date is not highlighted in red? Please tell me my mistake.
Hi I have managed to do your tutorial. The applications runs, however when I select the Weekly Text on top my application crashes.
Can you please help with this issue?
I did my digging and found out that the WeekViewActivity cannot be accessed. When you press the weekly button, it immediately crashes.
Now understood why youtube has given 0.75x speed option
What's the benefits of storing selectedDay in CalendarUtil vs. viewModel?
how would you add some sort of icon to the weekly view? so that you can see which days have events without clicking each one?
Hello Cal,
Very useful tutorial for me. I have one question here, which is how we can add total number of event count inside calendar date or changing background color of specific date. Please suggest me.
This is amazing, so glad i found this! Great video and great speed
♥️
Hi, thanks for the tutorial. I'm a newbie and this helped me a lot. Did you happen to leave out the "delete" event button from this tutorial on purpose?
Hi, Yes I did trying to keep each tutorial as short and to the point as possible.
If you are interested in persistent events check out this SQLite database tutorial.
ruclips.net/video/4k1ZMpO9Zn0/видео.html
hi, may i know if it possible for me to start my coding with this video instead of the monthly calendar video? because my desired app does not need the monthly view, it should start with weekly to daily.
Hi sir, can you help me? I need to add event to my database and I need to show my event in recyclerview. How to creat that?
Hello sir I am trying to use your code but I keep getting a null object reference error at monthYearFromDate do you know how to fix this?
Is the date null when you are calling date monthyearfromdate?
I would put in a break point, before this method is called and see the state of things.
For a long time I ignored debug mode and breakpoints. But they really can save so much time.
Hey, Cal..
First of all, thanks for this amazing tutorial.
I have a question: how do you pass this code into a fragment? I am having a problem with the code below; it's in setWeekView() fun in the Week Activity but when trying to pass into my fragment I don't know how to pass in the second value.
CalendarAdapter calendarAdapter = new CalendarAdapter(days, this);
As I have been seeing, the second parameter in that function/class is CalendarAdapter.OnItemListener so I don't understand why you passed this into the second parameter.
Thanks in advance!
change this to requireContext(), it is what i've been using when i switched from activities intent to fragments
When he built the class, he implements OnItemListener, making the object an OnItemListener. So when he passes in this, its passing in the object which is itself an OnItemListener.
Applying this to fragments is quite simple. You implement OnItemListener to the fragment and pass the fragment as an argument.
how to do it?..
I wanted to add a feature where the days that had events listed under them would be annotated/highlighted in some way to let users know that there are events on those days. Any suggestions?
Thats totally possible and you just need to do it the same way we highlight the selected day
Hi. Did you solve the problem?
@@atianlucho1752 were you able to solve the problem?
@@CodeWithCal could you give more info on this please? I have been trying for 2 days now to get this working but I can't seem to figure it out.
bro your videos are great
Aucti9neer. With my respect.
Hi cal I'm making a calendar with the video you uploaded. I want to change the date to Red when the event is added. I tried to do it in the same way as selected day, but it didn't work out.
ArrayList dailyEvents = Event.eventsForDate(CalendarUtils.selectedDate);
...
If (dailyEvents.size()>0){ //make red}
all dates change to Red. I think we need to get information on the date the event was added, but there's no progress
can you please tell me that how to add dark mode(that can be set by user or it should be adapt to whatever theme user has as default???
Can you hear me for a different menu calendar? I send an idea
hey, im facing some issue..the dates in the main activity layout are not visible..everything else the weekdays are visible and the previousweek and nextweek buttons are working fine..just the dates are not visible
Hmm could be a number of things, double check your xml and if you don't see anything off in there try putting a break point in the adapter and check why date textview is not being populated.
i think u should explain this video more slowly, but thanks a lot
Thanks for honest opinion 🙂
hello sir....how to save the events in Firebase or SQL lite?
hi cal, can you help me how to only change the color of the clicked week please
Hi, really nice video, I have succeed to create the calendar, but have question, how if I would like to put the selectedDate as intent and bring it to another activities? tries to convert it to string but not worked, can you help me?
You should be able to convert the date to a string using a dateformatter. Then as long as you use the same date formatter when converting the string back into a date on your next intent.
In short you are on the right track.
Hi, awesome content, really appreciate it!
How would you edit and/or delete the event?
This SQLite Database Tutorial is one option
ruclips.net/video/4k1ZMpO9Zn0/видео.html
Good learning brother
Thank you for your video , I really appreciate it
You are most welcome 🙂
Make new video on it , because android new features had came in 2024🎉
hi cal I wrote the code the same as on the film, but it does not save events to specific days, only to all of them
Worth double checking when we set the new events date what is being used. Try adding a break point and seeing what the value is :)
Thank you for the video.
There was no error in the code I made.
But only the day of the week came out and the date didn't come out.
How do I solve this?
And you have changed the array list to type Local date from string. The one thats passed into the adapter?
Hey Cal, Can you create Yearly view calendar
Hey, how can I set the current date textcolor? I want to separately highlight the current date.
Hey, Sure thing.
In the OnBindViewHolder
Similar to how we change the background color if the date equals selected date.
Do a check if date equals todays date if so change text to what ever color.
:)
where is that tutorial of monthly calender view..... i mean that previous tutorial
ruclips.net/video/Ba0Q-cK1fJo/видео.html
Hi sir how can I make highlight background local day of month with diferrent color ? thank you
In the adapter if date is equal to the current date change bg color to whatever.
exactly the same as how we set selected date background color
cool!
but your code written in java, is it easy convert to kotlin?
Yeah it is fairly easy to convert. kotlin is based on java. And if you copy paste java code into your kotlin project Android studio will even try and do the conversion for you. Worth checking though because auto converted code doesn't allways work out.
@@CodeWithCal alright thanks for this, ill try 🙏
@@rahmataulia Could you convert the code in Kotlin? I tried but I am having problems with Calendar Adapter because I am using the Calendar inside a fragment not in an Activity.
@@gcancino im never tried convert to kotlin, you should use context in fragment i think
@@rahmataulia tried but not working
how to show the days of the week for Example December 4 2021 Saturday
I think you can use a different date formatter. If you Google local dateformatter you should be able to see all the different combinations of date formatters you can use
can i get a copy of this code?
i think I've made typos and am unable to fix em.
It'll be helpful if i can get a reply to this asap
Link in description👆
@@CodeWithCal thanks
Can you make a Dailyl time record in Android studio?
ruclips.net/video/Aig99t-gNqM/видео.html&ab_channel=CodeWithCal
Anyone knows if this can be done on Minimum SDK Lollipop?
You can absolutely! You just won't have access to LocalDates which have a lot of convenience methods. But you can use just a regular dates. your methods will need to be a bit longer as there is a little more logic you will have to be responsible for
Using Sharingan to keep up with this tutorial is exhausting tbh..
Sir does it have a database?
Nope I try to keep the scope small.
I do have a video on SQlite database. You could combine the two videos:
ruclips.net/video/4k1ZMpO9Zn0/видео.html
@@CodeWithCal thank you sir new subscriber here please continue im from Philippines
Sir I was following your date picker toturial i have a querry plzzz help me out really need this help plzz
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...
Hello,
Set min date shouldn't take a long time.
So I think you are close. When d1 is set, set d2 min date to be d1 plus one day.
Also I don't think you need to convert the date to a long.
@@CodeWithCal sir what should i pass in setmindate
If am am passing the string date of d1 its giving erroe saying it it will only take long ????
@@rabbiaanjum9184 Apologies you do want to pass a long.
create a Date object from day month and year as described here:
stackoverflow.com/questions/16499228/creating-java-date-object-from-year-month-day
Then you can do something like this:
datePickerDialog.getDatePicker().setMinDate(dateObject.getTime());
@@CodeWithCal sir it is not givig me my desire result
Its giving same result as if am passing system.currentTimeMillis in setMinDate i.e todays date
@@CodeWithCal sir if you have time plz look into my pblm i really need to sort this out as i have my final demo in one day
I would be really thankful tou you sir ..
Do you mind sharing the source code for reference?
github.com/codeWithCal/CalendarTutorialAndroidStudio/tree/WeeklyCalendar
Can you connect this to database or firebase????
Try combining with this tutorial ruclips.net/video/4k1ZMpO9Zn0/видео.html
@@CodeWithCal hey another question how do you use this with a time picker for the event
@@katpark1733 ruclips.net/video/c6c1giRekB4/видео.html
Thank you very much
Would this also allow for timed reminders for events?
How to eliminate the events?
Really depends how you keep events persistent.
I have a tutorial on SQLite DBs if you are interested.
ruclips.net/video/4k1ZMpO9Zn0/видео.html
Why you code kotlin???
I like both Kotlin and Java :)
14:09
you are so fast, my advice slow your explanation please, not every people force understanding what are you spoken