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

disabled certain days

1 Answer 115 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Ricardo
Top achievements
Rank 1
Ricardo asked on 23 May 2012, 06:40 PM
hello
I have a datepicker which I disabled certain days.
as this can be done?

regards

1 Answer, 1 is accepted

Sort by
0
Ricardo
Top achievements
Rank 1
answered on 29 May 2012, 04:27 PM
Hi i need one "else"
<input id="datepicker" />
 
           <script>
               $(document).ready(function() {
                   var today = new Date(),
                       birthdays = [
                          +new Date(today.getFullYear(), today.getMonth(), 11),
                          +new Date(today.getFullYear(), today.getMonth() + 1, 6),
                          +new Date(today.getFullYear(), today.getMonth() + 1, 27),
                          +new Date(today.getFullYear(), today.getMonth() - 1, 3),
                          +new Date(today.getFullYear(), today.getMonth() - 2, 22)
                       ];
 
                   $("#datepicker").kendoDatePicker({
                       value: today,
                       month: {
                           // template for dates in month view
                           content: '# if ($.inArray(+data.date, [' + birthdays + ']) != -1) { #' +
                                        '<div class="birthday"></div>' +
                                    '# }else{ #'// here need else
                                    +'#= data.value }#'
                       },
                       footer: "Today - #=kendo.toString(data, 'd') #"
                   });
 
                   $("#datepicker").data("kendoDatePicker")
                                   .dateView.calendar.element
                                   .width(300);
               });
           </script>
but no works
anyone knows it does not work?
regards!!
Tags
Date/Time Pickers
Asked by
Ricardo
Top achievements
Rank 1
Answers by
Ricardo
Top achievements
Rank 1
Share this question
or