View week in datefield

Is it possible to see week number in a datefield component? is there any hidden property that activates it?

Best regards,

Nelson F.

Hello @nelsonflorez

Yes, there is a method to enable this feature. But the one exception is that week should start with Monday.

You can use the following workaround:

CubaDateField cubaDateField = ((WebDateField) dateField).getDateField();

cubaDateField.setLocale(Locale.UK);
cubaDateField.setShowISOWeekNumbers(true);

image

Regards,
Daniil.

1 Like