I am a java developer. I have developing one web application related with holiday activity. I am using GWT datepicker. How can i disable click event and don't show the past month day & next month day in the current month datepicker. I am disabled the previous & next button in the datepicker but when i click the next & past day in the current datepicker, it will navigate the selected month.
My Screen Shot:
Expected Result:
In my expected result marked yellow color is the unwanted day in the specific datepicker (no need to show) otherwise disable the click event to the specific day in the datepicker and how can i integrate CellGridImpl in my code.
code:
fTableLayout.setWidget(2, 0, datePicker);
fTableLayout.setWidget(2, 1, getDatePicker(year + "-02-01"));
fTableLayout.setWidget(2, 2, getDatePicker(year + "-03-01"));
fTableLayout.setWidget(2, 3, getDatePicker(year + "-04-01"));
fTableLayout.setWidget(3, 0, getDatePicker(year + "-05-01"));
fTableLayout.setWidget(3, 1, getDatePicker(year + "-06-01"));
public DatePicker getDatePicker (String date) {
DatePicker datePicker = new DatePicker();
DateTimeFormat format = DateTimeFormat.getFormat("yyyy-MM-dd");
datePicker.setCurrentMonth(format.parse(date));
datePicker.addStyleName("my-cal");
return datePicker;
}
Thanks in advance.