|
Rank: Advanced Member Groups: Member
Joined: 2/1/2008 Posts: 35
|
Hi,
I have a DatePicker on a page and if no entry has been made (date selected), when you click on the image button it will not show the current month, instead it shows the month I added it to the page (now a couple of months ago), it does however show the current date at the bottom of the pop-up calendar.
I can select the current month and date and it will then bind using the select method and then it shows that date in the picker in the future which is fine.
I have dragged a new version onto the page and can't see any difference that will allow it to show the current month on clicking the image button when opening a new calendar from the picker that has no date previously entered.
There must be something simple I am missing to allow the picker to be blank and the calendar pop-up with the current month and date showing? The visible date is set as VisibleDate="2008-05-01" which appears to creating the problem, should this be something like NOW() to always show the current date rather than the date the datepicker was created on the page?
I also see there are issues with construct methods re width & centre on the current date in the footer template? <td width="30"> </td> <td valign="center"> <img src="{img:00040401}"></td> <td valign="center"> Today: {var:today:MM/dd/yyyy}</td>
I am using VS2005 & vb, please can you let me know what is missing.
Regards.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
The Calendar is behaving exactly as it supposes to. There are a number of dates that the Calendar/DatePicker maintains:
1. The SelectedDate. This is the date that user selected or entered in the DatePicker textbox; 2. The current date. This is the current system date and obviously the Calendar/DatePicker never changes it; 3. The VisibleDate. This is the date that determines which month the Calendar displays.
For example, today is 7/11/08 (current date), your code can set VisibleDate to "1/1/2007" (visible date) and when the Calendar starts it shows the month of 1/2007. User can then scroll it to 5/2007 (visible date) and select 5/8/2007 (selected date).
Hope this clears up.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 2/1/2008 Posts: 35
|
Hi,
Not really, I want my users to be able to see the current month when they open the page and select the pop-up from the DatePicker if no date has been previously selected. At this rate I will constantly have to amend the page to show the current month or next year it will show a year behind which can't be correct.
Regards.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
Have you tried removing VisibleDate="2008-05-01"? I believe when you do not set it, it automatically takes the current month.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 2/1/2008 Posts: 35
|
Excellent, that did the trick thanks.
Regards.
|
|