Higgster
asked on
Calendar onclick
Hi,
Is there a way to get a confirmation msg on the asp calender?
I need to set curtain dates from a table to show a warning before the user continues.
I have tried the following and it all works other than the onclick.
For i As Integer = 0 To tblInstallerClearDays.Rows .Count - 1
ClearDayDate = Convert.ToDateTime(tblInst allerClear Days.Rows( i)("ClearD ayDate"))
If e.Day.Date = ClearDayDate Then
e.Cell.Font.Bold = True
e.Cell.ForeColor = Drawing.Color.Blue
e.Cell.Attributes.Add("onc lick", "confirm('This day is set to be clear,\nare you sure you want to continue?')")
End If
Next
Thanks
Is there a way to get a confirmation msg on the asp calender?
I need to set curtain dates from a table to show a warning before the user continues.
I have tried the following and it all works other than the onclick.
For i As Integer = 0 To tblInstallerClearDays.Rows
ClearDayDate = Convert.ToDateTime(tblInst
If e.Day.Date = ClearDayDate Then
e.Cell.Font.Bold = True
e.Cell.ForeColor = Drawing.Color.Blue
e.Cell.Attributes.Add("onc
End If
Next
Thanks
ASKER
Hi,
Thanks, just tried that but still no joy, if I take the "If" out, and run the code for every date in the calendar it works fine???
Thanks, just tried that but still no joy, if I take the "If" out, and run the code for every date in the calendar it works fine???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
For i As Integer = 0 To tblInstallerClearDays.Rows
ClearDayDate = Convert.ToDateTime(tblInst
If e.Day.Date = ClearDayDate Then
e.Cell.Font.Bold = True
e.Cell.ForeColor = Drawing.Color.Blue
e.Cell.Attributes.Add("onc
End If
Next