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

Popup on the DatePicker when MaxDate is hit

1 Answer 28 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 05 Mar 2010, 08:47 PM
I have a user who's complaining it's confusing that they cant click to another month past a maxdate I set...is there a way to put a javascript alert telling them that?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 08 Mar 2010, 10:17 AM

Hello Steve,

Attach OnCalendarViewChanging event to datepicker-calendar and try the following code in order to show alert when user trying to navigate to other month that is past than MaxDate.

client side code:

    function OnCalendarViewChanging(sender, args) {  
        if (args.get_step() > 0 && sender.FocusedDate[1] == sender.RangeMaxDate[1]) {  
            alert('Cannot navigate to next month...!');  
        }  
    } 

-Shinu.

Tags
Calendar
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Shinu
Top achievements
Rank 2
Share this question
or