Anyone got any ideas or pointers about a usable Windows/OS X Date Picker control?
There is one in the examples. If that one isn’t suitable then it would help if you specify what you need.
Nevermind, I’ve found the Calendar Window example and I’ll work with that…
Or have a look at Norman’s website for a nicer one
the above link goto www.example.com
Copy and paste the link does work.
yes i know… must be something wrong with the forum…
When you click the link button in the reply screen, there is a predefined template for making the link.
Markus forgot to replace the example link with his own link.
He only filled the link text.
Being an admin I fixed the link in Markus post - figured I should say that so no one thinks it was surreptitious
Simple oversight when pasting the link
Fun part is if you just put an URL in the text it works too like http://www.great-white-software.com/REALbasic_Code.html
Thanks Paul - I was actually not aware of where the link text goes as how I did it worked in the old forum. Might be an idea to put the dummy text in the link template.
Thanks Norman for fixing it.
I usually replace the “link text” with a nice description and not the link.
In your case I would have done it like:
[url=http://www.great-white-software.com/Great_White_Software/REALbasic_Code.html]Great White Software - REALbasic Code[/url]
I think they should change “link text” into “description” or something like that.
just the link: https://forum.xojo.com/2705-date-picker
Here is a DatePicker I found long ago, I changed the look and made a german version (Monday to Sunday)
The zip file includes english and german version
We use the Date, Time, and Calendar controls from Einhugur http://www.einhugur.com/index.html
Re the date picker in the examples, the update method is not calculating leap years correctly:
// Calculate February If (mSelectedDate.Year / 4.0) = Floor(mSelectedDate.Year / 4.0) Then monthDays = 29 // Leap year Else monthDays = 28
This will lead to 1900 being a leap year. Note, that years that can be divided by 100 are not leap years, unless they can be devided by 400.
So, while 2000 and 2400 are leap years, 2100, 2200 and 2300 are not.
I guess we will soon be facing the 2100 year problem…
at first sight it looks as if it is the same as the example. Again, the same issue with leap years.
Here’s a correct calculation of DaysInMonth:
// returns the number of days for a given month
// DaysInMonth (month as Integer)
// returns Integer (either 28,29,30,31)
select case month
// now the work starts: is it a leap year?
if year mod 4 = 0 then
// usually yes, but if mod 100 = 0 then not (example: 1900 is not a leap year)
if year mod 100 = 0 then
// usually no, except if mod 400 = 0 (but 2000 is…)
if year mod 400 = 0 then
I used to have the calendar control from Einhugur but having problem when clicking on the date on the calendar control pop up, it also set focus on the control under the calendar.
replacement for the broken link above
Leap year calculations are no joke