3

How can I capture the value from a check in and check out <li>? I already have many <ol> and <li> as you can see in this image: http://s2.subirimagenes.com/otros/previo/thump_7254872hot.jpg

I need to capture the check in value (in the image, from the orange line that is drag) until you mousedown (check out) but i just need the value from check in and check out.

For drag I have something like this:

$(function() {
        $( ".ui-selectable" ).selectable({
            options:{
            autoRefresh: true,
            distance: 40,
            disabled:true,
            filter: '*',
            tolerance: 'touch'
            },
            stop: function() {  
                var result = $( "#select-result" ).empty();
                $( ".ui-selected", this ).each(function() {
                    var index = $( "#selectablecls li" ).index( this );
                    result.append( " #" + ( index + 1 ) );
                });
            }
        });
    });

then many <li>

<ol id="selectable" class="ui-selectable selectablecls">
  <li class="null ui-state-default ui-selectee grdborder _a" style="width:28px" id="2011_11_07_9700000000000006_9700000000000002_a" rel="1" title="" width="28px"></li>
  <li class="null ui-state-default ui-selectee grdborder _b" style="width:28px" id="2011_11_07_9700000000000006_9700000000000002_b" rel="2" title="" width="28px">
  ....

As you can see in this image: http://s2.subirimagenes.com/otros/previo/thump_7254872hot.jpg

Jason Plank
  • 2,336
  • 5
  • 31
  • 40
Pedro Herencia
  • 129
  • 1
  • 4

1 Answers1

0

Check this out: https://github.com/tomasdev/jQuery-Scheduler/blob/master/index.html#L92

Basically the idea is that our grid is width-fixed and then you can count days / cells knowing that width. Then you just need to figure out the month, and save "this day this month" as start and "that day that month" as end edge.

If not clear enough, I'll explain further.

Tom Roggero
  • 5,777
  • 1
  • 32
  • 39