how to make the user to select only mondays in the ultrawebdatechooser?
Hi gagani,
Thank you for posting in our forum.
You can achieve this handling the CalendarValueChanging client-side event:
function WebDateChooser1_CalendarValueChanging(oCalendar, oDate, oEvent){ if (oDate.getDay() != 1) { oEvent.cancel = true; }}
Please let me know if this helps.
can we able to alert the user with "not-allowed" when the cursoris on other days when he tries to select?
<igsch:webdatechooser id="txt_DateFrom" runat="server" nulldatelabel="" style="z-index: 104; left: 395px; position: absolute; top: 128px"> <ClientSideEvents CalendarRenderDay="_greyoutexceptmonday" CalendarValueChanging="_valuechanging" /> <CALENDARLAYOUT TitleFormat="Month" PrevMonthImageUrl="ig_cal_blueP0.gif" NextMonthImageUrl="ig_cal_blueN0.gif" /> </igsch:webdatechooser>
The following are the functions:
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
<script type="text/javascript" language="javascript" >
function _valuechanging(oCalendar, oDate, oEvent) { if (oDate.getDay() != 1) { oEvent.cancel = true; } }
function _greyoutexceptmonday(oCalendar, oDay, oEvent) { if ($(oDay.element).index() != 0) {
oDay.element.style.color = "grey";
} } </script>
No effect has been seen. The color is remained black for all days.
Everything seems correct. Have you added reference to the jQuery library?
I'm just checking if you have resolved your issue.
it has not got resolved. The calendar is not making user to select except monday, but everything is in same black color.
The code has been pasted in the previous post. what do u mean by adding reference to jquery?
it is working for the selection of mondays only by the user with the same code, but not for greying out of days except monday.
A jQuery is used to select all days except mondays, so you should add reference to it - for example, include this line in the beginning of the <head> section of your page:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
Let me know if this helps.
Hi,
I'm just checking if you need any further assistance with the matter.
Hi aparnarege,
You have to add the jQuery reference in the head section of your master page. Also, note that the version 6.1 is outdated and is no longer supported. I would suggest you to upgrade your product.
Feel free to contact me if you have any further questions.
please find attached the complete aspx file
To attach a file, go to the 'options' tab when writing a reply.
My aspx page is completely in
</asp:Content>
Within that, I have all the things needed. So In the script tag within the content, when I introduced
the jquery as per you mentioned, even the selections of mondays has stopped working and user is able to select any day. so I didn't add the url of jquery. For now, it is only working for the selection of mondays, but still remained with the same problem of unable to grey out other days except monday.
I don't know how to attach my aspx file to this reply to give you more idea.