This is a migrated thread and some comments may be shown as answers.

Is There a Month Year Picker

1 Answer 106 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 03 Sep 2008, 03:19 PM
I need some suggestions.

I've got this requirement that the user selects a month and a year.  The user can not select a day, as I must always have the dates start on the first.
So something like Effective Date = Jan 01, 1997

I like the date picker, but  I don't want to show the calendar of days.  The user will attempt to pick the 15th, and I'll override their selection to the 1st, and then I'll get a ticket that it didn't pick the user selected value of the 15th.

I think just a list of Months and list of Years would be great.  Perhaps something with text boxes and the up/down arrows.  I'm shoving this in an InLine Edit of a grid.

Any thoughts, any controls that I missed to look at?

Thanks!

Tim

1 Answer, 1 is accepted

Sort by
0
-DJ-
Top achievements
Rank 1
answered on 03 Sep 2008, 03:57 PM
Hi Tim.

You can easily achieve this by setting  EnableNavigation="False" in your calendar control, and then "hacking" the skin css file by adding

display: none

to the

.TableLayout_MySkin

class.

Not best practice at all, but you end up with a calendar-button of sort that only allows users to select a specific month within a specific year.

Regards,
-DJ-
Tags
Calendar
Asked by
Jeff
Top achievements
Rank 1
Answers by
-DJ-
Top achievements
Rank 1
Share this question
or