3

チェックインとチェックアウトから値を取得するにはどうすればよい<li>ですか? 私はすでに多く<ol>を持っており<li>、この画像でわかるように: http://s2.subirimagenes.com/otros/previo/thump_7254872hot.jpg

あなたmousedown(チェックアウト) までチェックイン値 (画像では、ドラッグされているオレンジ色の線から) をキャプチャする必要がありますが、チェックインとチェックアウトからの値が必要なだけです。

ドラッグの場合、次のようなものがあります。

$(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 ) );
                });
            }
        });
    });

それから多くの<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">
  ....

この画像でわかるように: http://s2.subirimagenes.com/otros/previo/thump_7254872hot.jpg

4

1 に答える 1

0

これをチェックしてください:https ://github.com/tomasdev/jQuery-Scheduler/blob/master/index.html#L92

基本的には、グリッドの幅が固定されているため、その幅を知っている日数/セルを数えることができます。次に、月を把握し、「今月のこの日」を開始として保存し、「その月のその日」を終了エッジとして保存する必要があります。

十分に明確でない場合は、さらに説明します。

于 2011-12-23T19:06:47.673 に答える