I am trying to implement the date picker dialog but the dialog appears with just a single date and show rest of the date as blank what could be the reason?
This is definitely a Theme issue. The selected date is visible because of the contrast in text color and circle color. You can refer this link for understanding the anatomy of the Date Picker theme by the Material design guideline.
https://material.io/components/date-pickers#theming
Refer this answer for understanding which colors to use.
https://stackoverflow.com/a/29014475/4491971
You can use these attributes to change the colors via style
dayOfWeekBackground
dayOfWeekTextAppearance
headerMonthTextAppearance
headerDayOfMonthTextAppearance
headerYearTextAppearance
headerSelectedTextColor
yearListItemTextAppearance
yearListSelectorColor
calendarTextColor
calendarSelectedTextColor
If you share the current style and the code snippet, we can refine the answer more.
Related
I have a DatePickerDialoge in my Fragment, I have set its min and max valid dates.
datePickerDialog.setMinDate(calenderMinObj);
datePickerDialog.setMaxDate(calendarMaxObj);
It is working fine and valid dates are in bold
But I want to change the colour of all valid dates to green so user can easily understand. How can i do that?
You will have to add/override style to your DateTime Fragment. Please follow the below-mentioned link to achieve the desired result:-
https://www.tutorialsbuzz.com/2019/09/android-datepicker-dialog-styling-kotlin.html
I'm currently using this https://developer.android.com/reference/android/app/DatePickerDialog
What I would like to do is to be able to mark specific dates with a specific color. Say for example march 3 5 and 7 have a red circle around them. Is this possible?
There is also another easier way from customizing DatePickerDialog!
You can use this great library Material DateTime Picker to achieve your desired features.
[DatePickerDialog] setHighlightedDays(Calendar[] days):
You can pass a Calendar[] of days to highlight within setHighlightedDays(Calendar[] days) method. They will be rendered in bold. You can tweak the color of the highlighted days by overwriting mdtp_date_picker_text_highlighted
(from official doc)
I am using a Calendar View in Android I want to change the color of specific dates in calendar. For instance, I might want to set the color of all holidays to green, or the color of days with meetings to red. How can I do this in Android?
Try using CalenderView to create your own CustomCalendarView and change any desired colors in appearance.
You can find the code for the native CalendarView here.
Use this one:
import android.widget.CalendarView.OnDateChangeListener;
I am using a Calender View in android.I am trying to change the background color of the particular date which i want. I have gone through the Calender View Document Here
But not able find a method like SetDateBackgroundColor(Date date,Color color);
Please tell me how to achieve it?
I don't think there is a method for that but you can set an OnDateChangeListener which checks for the current date selected and changes the background if the date matches your date.
I would like to have a small brief calendar in wicket.
DatePicker is a component which has textField, and calendar is being shown for short period of time, until you select date.
But I need permanent calendar, like in Outlook.
Wicket FullCalendar is very large for me, I need the one of datePicker format.
There is such component, or no?
I don't think, there's a readymade component in core wicket for that. But it should be pretty easy to roll your own. Here are a few ideas on that:
Grab the DatePicker and extract the calender from there (Note that the DatePicker uses YUI internally).
Have a look at the WijCalendar component from the WiQuery project
just render the values as a table, apply CSS and let jQuery's Themeroller have a go.
Recently I needed such a calendar widget too. But couldn't find one. The Wicket calendar picker is based on the YUI component. Despite the base component supports inline display I couldn't find any parameter for the wicket date picker that triggers this mode.
Finally I came up with writing my own simple component. It uses the JQueryUI calendar widget.
Take also a look at Webical project. It's written in Wicket and it has what you need in its GUI: http://code.google.com/p/webical/wiki/Screenshots