### Set DateCell Tooltip

This is a bit of playground to handle CallBacks for DateCells.
Example adding a tooltip to a specific datecell ie date equals 2017-04-22.
Private DatePicker1 As DatePicker
Private joDP As JavaObject = Me
joDP.RunMethod("SetToolTips", Array As Object(DatePicker1))
If Java
import java.time.LocalDate;
import javafx.application.Application;
import javafx.scene.control.DateCell;
import javafx.scene.control.DatePicker;
import javafx.util.Callback;
public static void SetToolTips(DatePicker dp) {
final Callback dayCellFactory = new Callback() {
@Override
public DateCell call(final DatePicker datePicker) {
return new DateCell() {
@Override
public void updateItem(LocalDate item, boolean empty) {
super.updateItem(item, empty);
if (item.toString().equals("2017-04-22")) {
setTooltip(new Tooltip("My Cell Tooltip"));
}
}
};
}
};
dp.setDayCellFactory(dayCellFactory);
}
End If

Changed: , Category: DatePicker JavaFX 8, File: T6C182M1314.htm, ID: 1314