iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I am using intersoft web Calendar but I need to select all Sunday and Saturday .on page load.
Hello,Thank you for your question.I have made a simple WebCalender sample to select all Sunday and Saturday on this month.I add some validation javascript code in OnAfterRender client side event.I check all dates in this month and add all Sunday and Saturday to SelectedDates collection.Here the example snippet javascript code, how I select all Sunday and Saturday:
function OnAfterRender(controlId, calendarType) { var WebCalendar1 = ISGetObject(controlId); var calendar = WebCalendar1.Calendars[0]; var month = calendar.Month; var year = calendar.Year; sundays(year, (month - 1)); return true; } function sundays(year, month) { var WebCalendar1 = ISGetObject("WebCalendar1"); WebCalendar1.SelectedDates.Clear(); var day = 1; var counter = 0; var date = new Date(year, month, day); while (date.getMonth() === month) { if (date.getDay() === 0 || date.getDay() === 6) { // Sun=0, Mon=1, Tue=2, etc. //To add the date to SelectedDate collection WebCalendar1.SelectedDates.Add(new WebCalendarSelectedDates(date)); WebCalendar1.SelectedDate = date; } day++; date = new Date(year, month, day); } }
Please kindly also have reviews on my sample to see the result and let me know your response.Regards,Hans.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname