alfr Posted September 15, 2019 Posted September 15, 2019 Hi, We use week numbers a lot. Our users/clients use them in the dialog with their customers. How can the uniDateTimePicker and unidbDateTimePicker be reconfigured to also show the week number (iso8601 week number) on the left side when the monthly calender is shown? Left - date picker calendar unigui - right other example from Outlook - with the week numbers marked with yellow. Below sample js script for calculating the week number. Would appreciate if someone with good knowledge in UniGui how to reconfigure the calender... function ISO8601_week_no(dt) { var tdt = new Date(dt.valueOf()); var dayn = (dt.getDay() + 6) % 7; tdt.setDate(tdt.getDate() - dayn + 3); var firstThursday = tdt.valueOf(); tdt.setMonth(0, 1); if (tdt.getDay() !== 4) { tdt.setMonth(0, 1 + ((4 - tdt.getDay()) + 7) % 7); } return 1 + Math.ceil((firstThursday - tdt) / 604800000); }
Sherzod Posted September 16, 2019 Posted September 16, 2019 11 hours ago, alfr said: How can the uniDateTimePicker and unidbDateTimePicker be reconfigured to also show the week number (iso8601 week number) on the left side when the monthly calender is shown? Hi, Need to investigate.
Sherzod Posted September 18, 2019 Posted September 18, 2019 On 9/15/2019 at 10:34 PM, alfr said: How can the uniDateTimePicker and unidbDateTimePicker be reconfigured to also show the week number (iso8601 week number) on the left side when the monthly calender is shown? Hi, At the moment it looks something like this:
alfr Posted September 18, 2019 Author Posted September 18, 2019 Great! The week Numbers are there so really everything we need. Thanks for investigating! Is it complicated to implement?
Sherzod Posted September 19, 2019 Posted September 19, 2019 8 hours ago, alfr said: Is it complicated to implement? Need to override some methods and add some methods and properties, and take into account themes.
alfr Posted September 19, 2019 Author Posted September 19, 2019 Ok. So will it be available in a future version or something that I can implement by your instructions and code? (I'm currently using version 1.70.0.1489)
Sherzod Posted September 19, 2019 Posted September 19, 2019 15 minutes ago, alfr said: Ok. So will it be available in a future version or something that I can implement by your instructions and code? (I'm currently using version 1.70.0.1489) I hope that maybe this will be available in future versions. Well, if I can complete this in some working state, I will post the solution here too. 20 minutes ago, alfr said: I'm currently using version 1.70.0.1489 Ok. I think it's better to upgrade to the latest version :)
Recommended Posts