Android-SwitchDateTimePicker icon indicating copy to clipboard operation
Android-SwitchDateTimePicker copied to clipboard

Change Format

Open nzala opened this issue 8 years ago • 5 comments

Can i change Format f CalendarView like https://camo.githubusercontent.com/4896da076522a1187ebaadc747ed7d437393adab/68747470733a2f2f7261772e6769746875622e636f6d2f6a6a6f6265732f536c6964654461746554696d655069636b65722f6d61737465722f73637265656e73686f74732f312e706e67

using dd and MMM instead CalendarView

nzala avatar Dec 07 '16 12:12 nzala

Sorry but your link doesn't work. The CalendarView is the unique view for calendar, if you want listView for day and month you can do it easily. If you want to change format of label use

// Define new day and month format
try {
    dateTimeFragment.setSimpleDateMonthAndDayFormat(new SimpleDateFormat("dd MMMM", Locale.getDefault()));
} catch (SwitchDateTimeDialogFragment.SimpleDateMonthAndDayFormatException e) {
    Log.e(TAG, e.getMessage());
}

J-Jamet avatar Dec 07 '16 13:12 J-Jamet

i am Sorry for it 68747470733a2f2f7261772e6769746875622e636f6d2f6a6a6f6265732f536c6964654461746554696d655069636b65722f6d61737465722f73637265656e73686f74732f312e706e67

pls check

i want in listView for day and month in words eg
mon Dec 5, tue Dec 6, today, thu Dec 8......

nzala avatar Dec 07 '16 14:12 nzala

OK it's better! :p this view isn't implemented, I tried to respect the conventions of Material Design, it's for me a deprecated view. But if you want to create it you can, I can merge it with the main code and add an option to select one or the other.

J-Jamet avatar Dec 07 '16 14:12 J-Jamet

i meant abut only the way of displaying listView for day and month in words eg mon Dec 5, tue Dec 6, today, thu Dec 8.

Leave the View I to respect Material Design 👍

nzala avatar Dec 08 '16 06:12 nzala

I see what you mean. But in header we have only TextView and for "Month and Day" it can be changed by a SimpleDateFormat because each language is different. A format file would already be needed for each language (I'll do it if I have time). In the case of listView, all cases would have to be managed, it would take a very long time. This is possible but not a priority for me :/ Sorry.

J-Jamet avatar Dec 08 '16 15:12 J-Jamet