I think you may have hit the point there on the index. I work mostly in languages which use 1 as the first position. I will try it out and see.
On Oct 27, 12:46 pm, Fontzter <dmfo...@gmail.com> wrote: > David, > > That code appears like it should work (in either browser) with one > correction: > > the inArray check should be < 0 not <= 0 so that the first date entry > is not excluded. It actually returns -1 if not found so you could > also do == -1 > > Not knowing what you are using to convert your variable, I would want > to rule that out first. I put your code up on jsbin, commented out > the dynamic variables you have and just hardcoded a few dates in. It > worked in IE (I only had IE6 available) and FF. > > http://jsbin.com/oqeze/edit > > Maybe there is a trailing pipe sign or something else messing with the > array. You could alert the variable to inspect it in IE. alert > (strHolList); > > Hth, > > Dave > > On Oct 27, 9:57 am, David <dapul...@gmail.com> wrote: > > > I have ran into a bit of a sticky situation here. I am using the > > jQuery-UI datepicker with great success in my web application but I > > have ran into a snag. I have dates I need to block so I used another > > solution I found here on the groups. As a reality that I work with, > > my code has to work perfectly in MSIE 7.0 as well as Firefox. To my > > amazement, I discovered that in MSIE my locking out code will not > > function. Can someone take a look and maybe tell me what I need to do > > to make it cross platform compatible? Note: I am using a larger > > development tool that will replace &P2_HOLIDAY. with a string of text > > containing dates separated by a pipe ( | ) before it reaches the web > > browser. I don't show my item binds here because everything is done > > by setting the datepicker defaults. > > > <script language=javascript> > > var strHolList = "&P2_HOLIDAY."; > > var dateList = strHolList.split( "|" ); > > $.datepicker.setDefaults({ > > dateFormat: 'dd-M-yy', > > showOn: 'both', > > buttonImageOnly: true, > > buttonText: '', > > minDate: pValue /*'+14'*/, > > buttonImage: '#WORKSPACE_IMAGES#calendar.gif', > > monthNamesShort: > > ['JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC'], > > constrainInput: true, > > beforeShowDay: function(dateToShow){ > > return [($.inArray($.datepicker.formatDate('yymmdd', > > dateToShow),dateList) <= 0), ""]; > > }}); > > > </javascript> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery-ui@googlegroups.com To unsubscribe from this group, send email to jquery-ui+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---