You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First get a list with your required dates - "holidaydata". You can use do while loop to get the Saturdays and Sundays for the given time period and add along with your other holdiays to this list.
Using setDisabledDays(disbledDays) you can disable these days.
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); java.util.Date date = null; for (String holidaydatum : holidaydata) { try { date = sdf.parse(holidaydatum); } catch (ParseException | java.text.ParseException e) { e.printStackTrace(); } calendar = dateToCalendar(date); List<Calendar> dates = new ArrayList<>(); dates.add(calendar); Calendar[] disbledDays = dates.toArray(new Calendar[dates.size()]); dpd.setDisabledDays(disbledDays); }
Hello,
is it possible disable (for example) all saturday of each month and year?
or disable 25 dicember of each year?
etc.
The text was updated successfully, but these errors were encountered: