Hi,

Apart from the missing closing quote in the $test variable the js code looks
correct. Does IE report an errors? Could you post up a minimal test page?

On Sat, Jan 24, 2009 at 3:27 AM, Mark <[email protected]> wrote:

>
> I apologize if this is a repost, I tried posting this issue this
> morning and it doesn't appear to have posted.
>
> I'm working on a custom Datepicker that is used in conjunction with
> php to pull dates from a database and then allow only those dates to
> be selectable.  The code looks like this:
>
> <?php
> $test="natDays=[[1, 22, 109, 'us'], [1, 21, 109, 'us'], [1, 20, 109,
> 'us'], [1, 19, 109, 'us']];
> ?>
>     <script type="text/javascript">
>        $(function() {
>
>            $("#datepicker").datepicker({ beforeShowDay:
> nationalDays})
>
>    <?=$test ?>
>
>
>
>    function nationalDays(date) {
>        for (i = 0; i < natDays.length; i++) {
>          if (date.getMonth() == natDays[i][0] - 1
>              && date.getDate() == natDays[i][1]  && date.getYear() ==
> natDays[i][2]) {
>            return [true, natDays[i][3] + '_day'];
>          }
>        }
>      return [false, ''];
>    }
>
>
>        });
>        </script>
>
> This code works perfectly in firefox, but in any version of IE it
> doesn't render the selectable dates.  Any suggestions?
>
> >
>


-- 
Ca-Phun Ung
+ http://yelotofu.com
+ hongkong, zce, jquery, php, css, html

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to