Quantcast
Viewing all articles
Browse latest Browse all 12583

How to simulate to choose date time in the calendar

Image may be NSFW.
Clik here to view.

bove is the calendar displayed on the website, when I click the available time(white time was disabled, they can not be selected) then the 'next' button will be enabled, after push 'Next' button, will forward to next page.

Here is my question: there is JavaScript event on the 'time' item, how can I simulate to choose the time in c# webBrowser ? Below is the JavaScript code about the calendar:

/setup timetable(function(){var timetable = dojo.query('.rms_timeSelPick')[0];

    dojo.query('#timetableZone').attr('aria-live','polite');//add onclicks to links in tables
    dojo.query(timetable).query('a').forEach(function(node, index, array){
      dojo.connect(node,'onclick',function(e){if(dojo.hasClass(node,'available')){
          dojo.query(timetable).query('.selected').removeClass('selected').attr('aria-checked','false');
          dojo.query(node).addClass('selected');
          dojo.query(node).attr('aria-checked','true');var list = dojo.query(timetable).query('.available')for(var time =0; time < list.length; time++){var cell = dojo.query(list[time]);if(dojo.hasClass(cell[0],'selected')){
        		cell.attr('tabindex','222');}else{
				cell.attr('tabindex','221');}}var t = dojo.query(node).attr('value');
          dijit.byId('selectedDateTime').attr('value', t[0]);//enable the next button
          dijit.byId('nextButtonTimeslot').setDisabled(false);}});});

Any help is appreciate, thanks.


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>