mikecotrone / calendartimechooser Goto Github PK
View Code? Open in Web Editor NEWXojo Calendar and Time Chooser Picklist
License: Other
Xojo Calendar and Time Chooser Picklist
License: Other
This is due to the refactoring I did to un-spaghetti my code base. :)
Tested on OS X Mavericks 10.9.3.
When selecting the 31st on any month the selected date is returned as the 1st.
Time Picker Custom Canvas not showing highlight Rect correctly
After Hiding previous/next month - days still clickable.
Day of Week Abbreviations are not center each slot
Thanks to Jon Ogden for finding and fixing this leap year issue
In the method calcMonthNumber:
Currently:
Private Function calcMonthNumber(inMonth as String) As Integer
If inMonth = Localized_February AND LeapYearBool = True OR inMonth = Localized_August Then
Return 0
Elseif inMonth = Localized_February AND LeapYearBool = False Then
Return 0
Elseif inMonth = Localized_November OR inMonth = Localized_March Then
Return 1
Elseif inMonth = Localized_June Then
Return 2
ElseIf inMonth = Localized_September OR inMonth = Localized_December Then
Return 3
ElseIf inMonth = Localized_January AND LeapYearBool = True OR inMonth = Localized_April OR inMonth = Localized_July Then
Return 4
Elseif inMonth = Localized_January AND LeapYearBool = False OR inMonth = Localized_October Then
Return 5
Elseif inMonth = Localized_May Then
Return 6
End if
End Function
Problem is that in the above code, in non-leap years, February and August do not have the same day pattern. February, March and November have the same day pattern in non-leap years:
Corrected:
Private Function calcMonthNumber(inMonth as String) As Integer
If inMonth = Localized_February AND LeapYearBool = True OR inMonth = Localized_August Then
Return 0
Elseif (inMonth = Localized_February AND Not LeapYearBool) OR inMonth = Localized_November OR inMonth = Localized_March Then
Return 1
Elseif inMonth = Localized_June Then
Return 2
ElseIf inMonth = Localized_September OR inMonth = Localized_December Then
Return 3
ElseIf inMonth = Localized_January AND LeapYearBool = True OR inMonth = Localized_April OR inMonth = Localized_July Then
Return 4
Elseif inMonth = Localized_January AND LeapYearBool = False OR inMonth = Localized_October Then
Return 5
Elseif inMonth = Localized_May Then
Return 6
End if
End Function
After downloading the project Xojo IDE crash when attempt to open CalendarTimeChooser.xojo_project
Add a call back structure for passing selected values back to Calling Window TextFields (for example)
Hi Mike,
Bug in the program, put the date to view the output of the Submit button.
dim SelectedDate1 as Date = SelectedDate
MsgBox ("Thank you for choosing our project " + str(SelectedDate1))
Select 12h format go submit button, is ok.
Select 24 hour format go submit button, is wrong, puts one more day.
I try to put your app in a app with recursive dates, similar a contract, i need recursive dates with the same number day for each month, for example put in a db for a customer make the delivery note for the 5 of January, 5 of february, 5 of march, etc ,etc until 5 of december for example.
Is possible with your Add-On?
Thanks for your time,
Odon
When you click on a previous day or next day on the current calendar view it does not take you to the correct day on that month that is now current.
Using XOJO 2016R3 and 2016R2.1 when selecting a date that date turns to the same color as the
background making it appear that it doesn't exist. Using XOJO 2015R2.1 I do not have this issue.
I tried to change the properties TodaysDate_NotSelected and TodaysDate_Selected with no change.
The current date was 11/9 and it's "blank".
Current date of 11/10 with 11/11 selected.
I'm developing on Windows 7 SP1 64-Bit.
Change Dim to Var.
Done
This is an unexpected bug in the CalendarClass --> MouseUp event
DOW and Day are out of sync
Not expected and will block this.
in In 3_Cal-Time Chooser Custom Classes
Calendar Paint Event
// Draw Days Centered
you forgot to change to:
Problem with enums Try to run demo under OS X (Yosemite tested).
In 3_Cal-Time Chooser Custom Classes (Calendar Paint Event)
Targets are only Win and OSX
replace all lines
with
Days are out of alignment reported by Axel Schneider:
Today is Sunday 21 of February and the calendar shows Sunday is 22 of February
Switch Over If/Then X/Y based slot creation / detection with Xojo.Rect.
This would be a much easier implementation to mange and extend.
In your program 'Xojo Calendar and Time Chooser' perhaps there is an error in the calculation of leap years:
A year is a leap year if:
(year is divisible by 4 AND year IS NOT divisible by 100) OR year is
divisible by 400
Best regards,
Domenico Marinelli
You can't select a custom calendar date upon start no matter if you specifically select a new date or not. It will always default to Today's Date.
Please add the ability to add a custom date for the calendar to begin using.
So far the only change I can see MUST be made has to do with hiding tooltips
Gradient Feature: Only Applies to Windows Xojo IDE Users Only
I am still trying to work out how to properly add the gradient feature to the Windows build. Natively windows is horrible with screen flicker as we have to use then canvas.doublebuffer property. Unfortunately this project won't allow the Clock canvas to maintain it's transparency atop of the date-time canvas while using doublebuffering.
This is a known caveat and as a workaround I have used #IF target statements to hide the gradient feature from the demo and working project.I am still working on this so hang tight :)
This is the way I'm calling the Picker:
MyPicker.drawColSeperatorLines = True
MyPicker.LocalizationInt = 6
MyPicker.StartYear = DateTime.Now.Year - 3
MyPicker.EndYear = DateTime.Now.Year + 3
MyPicker.SelectedDate = DateTime.Now
MyPicker.TimeMode = 24
MyPicker.flashSeparator = False
MyPicker.Invalidate(False)
MyPicker.Show
and when I try to read the selected date/time (in the DateTimeWindow code, where I created a button with an action event) with:
ProgramWindow.chosenDate = self.SelectedDate
System.DebugLog("Datum = " + ProgramWindow.chosenDate.ToString(Locale.Current, DateTime.FormatStyles.Medium, DateTime.FormatStyles.Short))
I get the following:
Datum = 01.02.2020, 04:16
When I change the MyPicker.TimeMode to 12 it's:
Datum = 01.02.2020, 16:16
The picker itself displays the 24hour-mode correctly, but the property .SelectedDate
does not.
On a Win/Mac project, I included a sheet Window with a Date_Time_Container showing only the calendar. I want to display a different reminder date when the sheet opens, something like today + 14 days. But no matter what I tried, the calendar opens with the current date selected (showing October while RemindDate lies in November). When I click myself into the next month, the ReminderDate is blue too (but not inverse on a blue rectangle).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.