I need to add Jalali Calendar to my JavaFX application. I have already extended Chronology class and have added JalaliChronology to my application. When I use the following block of code, it correctly detects what day of what month of what year we're at.
DatePicker datePicker = new DatePicker();
Locale.setDefault(new Locale("fa"));
datePicker.setChronology(JalaliChronology.INSTANCE);
But, I need to use the actual name of months and days used in Jalali Calendar. Right now I see January as the first month of each year while I want to replace it with فروردین.
the following picture that I borrowed from internet tells me that it should be doable but I couldn't yet figure out how.
Also, I know that I can modify the display text of each cell inside my calendar using following block
final Callback<DatePicker, DateCell> dayCells = new Callback<DatePicker, DateCell>()
{
public DateCell call(final DatePicker datePicker)
{
return new DateCell()
{
@Override
public void updateItem(LocalDate item, boolean empty)
{
...
}
};
}
};
Is there any way by which I can also change the display text for January, February, ..., Sat, Sun, ... and Fri in my Jalali Calendar?
EDIT: here is a screenshot of what I already have. After setting the Locale it uses Farsi but, what I see is simply how January is spelled in Farsi (which is ژانویه). It doesn't use the actual name of the month in Jalali Calendar which is فروردین

