Xamarin forms date picker android - xamarin

I'm using Xamarin Forms for android and IOS.
and I need to make the year section in the date picker dialogue Clickable.
because I can not select the year it is only months selection.
the problems with this is if I want to go 10 years behind I need to change the month page 120 times which make a very poor user experience.

Please click the year label (for example: 2016).
Once you click on the year label, a list of years will display.Then you can scroll the year list and select the special year you want.

Related

How do you make a clickable timeline template in powerpoint?

I am looking to make a template wherein a particular slide has a linear timeline of years displayed with a bubble-like icon above each year. Whenever a bubble is clicked, the info corresponding to that particular year is displayed.
I don't want to make a presentation displaying the information chronologically (2000->2001->2002 etc). Any year's info should be revealed in-place and exclusively seen when it's clicked on
Is it possible to do so in PowerPoint? If so, please guide me to a resource or template for the same!

using UIDatePicker with only day and month swift

I am making an app, uses UIDatePicker component. Everything works fine with the below code.
myDatePicker.datePickerMode = UIDatePickerMode.Date
My problem is here how to avoid the year column, days and months are the only data that i want to show in the component.
Like:
2 November
3 November
thanks
This is a bit tricky but if you don't have to deal with date formats and locale it may work for you.
Place the UIDatePicker inside a UIView and align all sides to the containing view's edges. Then change the right side constraint from 0 to -100 (you may have to find a different number depending on the size you want to give it).
In the containing UIView's User Defined Runtime Attributes add a key named clipsToBounds, make it a Boolean and make sure it is checked.
This will hide the edge of the Date Picker that is aligned beyond the UIView's right side.
Make sure you set a minimum and maximum date for January 1st to December 31st of a specific year (so the user doesn't accidentally go outside that year and you don't have to deal with multiple years).

Show only specific days on calendar

I want to know if it's possible to show only specific days in a calendar. I mean, for example, I know that I can create a dialog box with a calendar using:
dialog --title "Test" --calendar "Date:" 0 0
And it shows every day on the specific months and so on.
But I want to know if I can show only the days like 5, 10, 15, 20, 25, 30 in the same dialog box, but I don't know how to do it or if it can be done that way using that dialog option.
dialog does not do what was asked. Source code is provided; you could modify it.
The documentation says
--calendar text height width day month year
A calendar box displays month, day and year in separately adjustable windows. If the values for day, month or year are
missing or negative, the current date's corresponding values are
used. You can increment or decrement any of those using the
left-, up-, right-, and down-arrows. Use vi-style h, j, k and l
for moving around the array of days in a month. Use tab or
backtab to move between windows. If the year is given as zero,
the current date is used as an initial value.
On exit, the date is printed in the form day/month/year. The
format can be overridden using the --date-format option.
and
--date-format format
If the host provides strftime, this option allows you to specify
the format of the date printed for the --calendar widget. The
time of day (hour, minute, second) are the current local time.
While the --calendar description refers to an array of days, and separately adjustable windows, it does not go into excessive detail to note that the windows for month, day and year are used to update the array, and that the widget shows all of the days for each month.
The --date-format option is used to change the way the result is reported to the shell, and has no effect on the way the month is shown on the screen.

NSDatePicker failing to refresh when setting date to current date

I have an NSDatePicker with an associated NSButton that changes the current date to "Today" when pressed.
However: When the date is currently January 4th, 2014, and I use the built-in arrow buttons to switch to a different month without changing the actual selected date, there seems to be no way to get the calendar to refresh. Here's a video of the issue:
Video of the Issue: https://www.dropbox.com/s/ay7fljnoyxb06ua/Calendar%20Test%20Video.mov
See the attached sample project for an example. To reproduce:
Click "Today"
Click the right-arrow button to switch to a different month (without selecting an actual day)
Click "Today"
The NSDatePicker seems to fail to refresh if you're programmatically selecting a date that is not in the currently-viewed month, and if the date that it is switching from is in a different month as well.
But, the date is properly picked. If you use the buttons to select a date, then manually browse back to the proper month, the date has been selected. But the calendar never shows you that month automatically, unless the date you're switching from is in the currently-viewed month.
Sample Project: https://www.dropbox.com/s/tnpox2mt5f5z2nb/CalendarTest.zip
I would file this as a bug against the API since there are no methods in the class that suggest you'd have to ask it to refresh manually (I'd assume setting the selected date would automatically display the proper range to show that selection).
As a work-around, you might try asking it to display ( -setNeedsDisplay:YES ) or manually twiddling its min/max range after setting the date, then setting it back to unlimited immediately after. Maybe that'll kick-start it into displaying the correct range for the selected date.

Stepper behavior in an NSDatePicker messed up?

I have an NSDatePicker with text and stepper. The steppers show behavior that I find quite unintuitive. If my date picker is at the 26th of April and I select the day number, then click "up" a few times, the date picker cycles back to April 1st after the 30th!
How do I make the picker continue into May?
You might be able to use the delegate method - (void)datePickerCell:(NSDatePickerCell *)aDatePickerCell validateProposedDateValue:(NSDate **)proposedDateValue timeInterval:(NSTimeInterval *)proposedTimeInterval as it sends a message whenever the date changes, however it does not inform whether the change was made through the buttons or through keyboard, so if the user manually changed the date from 30-04-2013 to 01-04-2013 you have no way of telling if they did it with the buttons or with the keyboard. You might be able to subclass the buttons to detect if a click happened, but I would say that's too much of a hassle. I would say this should be the least of your worries, or you could do what Robert Harvey suggested which is to use a dropdown calendar, which can be changed using the method [datePicker setDatePickerStyle:NSClockAndCalendarDatePickerStyle] or through interface builder.

Resources