Visualizzazione dei risultati da 1 a 10 su 23

Visualizzazione discussione

  1. #6
    Utente di HTML.it
    Registrato dal
    Feb 2015
    Messaggi
    25
    Ciao a tutti,
    sto adottando un altro jquery da data a data.

    La domanda per questo script è la stessa che ho fatto sul primo post che prevedeva una sola data.

    In pratica devo passare il valore sia "da data" che "a data" ma in data mi appare prima una data e quando immetto la seconda in data trovo la seconda data.
    Quindi quando imposto questa istruzione naturalmente mi passa solo l'ultima data
    <a href=\"javascript:Ricerca('tabella1','Data', $data)\">
    come faccio a fargli passare entrambi le date?
    <a href=\"javascript:Ricerca('tabella1','Data', $from, $to)\">


    sotto lo script e in fondo il valore data all'interno del try ecc.
    codice:
    <!doctype html>
     <html lang="en">
     <head>
       <meta charset="utf-8">
       <meta name="viewport" content="width=device-width, initial-scale=1">
       <title>jQuery UI Datepicker - Select a Date Range</title>
       <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
       <link rel="stylesheet" href="/resources/demos/style.css">
       <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
       <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
       <script>
       $( function() {
         var dateFormat = "mm/dd/yy",
           from = $( "#from" )
             .datepicker({
               defaultDate: "+1w",
               changeMonth: true,
               numberOfMonths: 3
             })
             .on( "change", function() {
               to.datepicker( "option", "minDate", getDate( this ) );
             }),
           to = $( "#to" ).datepicker({
             defaultDate: "+1w",
             changeMonth: true,
             numberOfMonths: 3
           })
           .on( "change", function() {
             from.datepicker( "option", "maxDate", getDate( this ) );
           });
            function getDate( element ) {
           var date;
           try {
             date = $.datepicker.parseDate( dateFormat, element.value );
           } catch( error ) {
             date = null;
           }
              return date;
         }
       } );
       </script>
     </head>
     <body>
       
    <label for="from">From</label>
     <input type="text" id="from" name="from">
     <label for="to">to</label>
     <input type="text" id="to" name="to">
     </body>
     </html>
    Grazie molte
    Ultima modifica di ciro78; 16-10-2016 a 21:39 Motivo: tag code

Tag per questa discussione

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.