File tree Expand file tree Collapse file tree
Ranger/src/main/java/com/andressantibanez/ranger Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -318,12 +318,19 @@ private void render() {
318318 DayView dayView = new DayView (view );
319319
320320 //Set texts and listener
321- dayView .setDayOfWeek (startDate .dayOfWeek ().getAsShortText ().substring (0 , 3 ));
321+ String dayOfTheWeekShortText = startDate .dayOfWeek ().getAsShortText ();
322+ dayView .setDayOfWeek (
323+ dayOfTheWeekShortText .length () >= 3 ? dayOfTheWeekShortText .substring (0 , 3 ) : dayOfTheWeekShortText
324+ );
322325 if (!mDisplayDayOfWeek )
323326 dayView .hideDayOfWeek ();
324327
325328 dayView .setDay (startDate .getDayOfMonth ());
326- dayView .setMonthShortName (startDate .monthOfYear ().getAsShortText ().substring (0 , 3 ));
329+
330+ String monthOfTheWeekShortText = startDate .monthOfYear ().getAsShortText ();
331+ dayView .setMonthShortName (
332+ monthOfTheWeekShortText .length () >= 3 ? monthOfTheWeekShortText .substring (0 , 3 ) : monthOfTheWeekShortText
333+ );
327334
328335 isDayDisabled = disabledDatesContains (startDate );
329336
You can’t perform that action at this time.
0 commit comments