(X)HTML, JavaScript, DHTML, XML, CSS Client scripting tehnologije, Dynamic HTML, Cascading Stylesheets, XML i standardi |
|
Alati teme | Način prikaza |
24. 05. 2015. | #1 |
član
Certified
Datum učlanjenja: 06.09.2012
Poruke: 64
Hvala: 0
342 "Hvala" u 10 poruka
|
datetimepicker
Imam problem kad hocu da promenim jezik u datetimepickeru na link nece da radi, hoce preko select al preko linka nikako
<!doctype html> <html > <head> <meta charset="utf-8"> <title></title> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <script src="datepicker-ar.js"></script> <script src="datepicker-fr.js"></script> <script src="datepicker-he.js"></script> <script src="datepicker-zh-TW.js"></script> <script src="datepicker-sr-SR.js"></script> <link rel="stylesheet" href="/resources/demos/style.css"> <script> $(function() { $( "#datepicker" ).datepicker( $.datepicker.regional[ "fr" ] ); $( "#locale" ).change(function() { $( "#datepicker" ).datepicker( "option", $.datepicker.regional[ $( this ).val() ] ); }); }); </script> </head> <body> <p>Date: <input type="text" id="datepicker"> <select id="locale"> <option value="ar" id="ar">Arabic ((العربية</option> <option value="zh-TW" id="zh-TW">Chinese Traditional (繁體中文)</option> <option value=""id="en">English</option> <option value="fr" id="fr" selected="selected">French (Français)</option> <option value="he" id="he">Hebrew ((עברית</option> <option value="sr-SR" id="sr-SR">Srpski</option> </select></p> <br> <br> <a href="#" id="sr">Srpski</a> || <a href="#" id="fr" >Francuski</a> <br> <input type="text" id="odaberi"> <script> $(function() { $("#odaberi").datepicker($.datepicker.regional["sr-SR"]); $("#fr").click(function(){ $("#odaberi").datepicker($.datepicker.regional["fr"]); }); }); </script> </body> </html> prvi datapicker radi al meni treba preko linka datapicker sa id="odaberi" ne radi Molim za pomoc Poslednja izmena od stanke : 24. 05. 2015. u 19:40. |
27. 05. 2015. | #2 |
expert
Grand Master
|
koristi neki jsbin da bi share-ovao kod.
ovde recimo: http://jsbin.com/huxorefehi/1/edit inace, tu ne radi ni select, ni link Off Topic: nije dobra ideja da pises promenljive i komentare na srpskom Poslednja izmena od robi-bobi : 27. 05. 2015. u 10:29. |
138 članova zahvaljuje robi-bobi za poruku: |
27. 05. 2015. | #3 |
član
Certified
Datum učlanjenja: 06.09.2012
Poruke: 64
Hvala: 0
342 "Hvala" u 10 poruka
|
Resio sam ako nekome treba evo koda
<!doctype html> <html > <head> <meta charset="utf-8"> <title>Date Picker</title> <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="http://code.jquery.com/jquery-1.10.2.js"></script> <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <script src="datepicker-ar.js"></script> <script src="datepicker-fr.js"></script> <script src="datepicker-he.js"></script> <script src="datepicker-zh-TW.js"></script> <script src="datepicker-sr-SR.js"></script> <script> $(function() { $('#datepicker').datepicker($.datepicker.regional['fr']); $('#locale').change(function() { $('#datepicker').datepicker('option',$.datepicker. regional[$(this).val()]); }); }); </script> </head> <body> <p> Date: <input type="text" id="datepicker"> <select id="locale"> <option value="ar">Arabic ((العربية</option> <option value="zh-TW">Chinese Traditional (繁體中文)</option> <option value="en">English</option> <option value="fr" selected="selected">French (Français)</option> <option value="he">Hebrew ((עברית</option> <option value="sr-SR">Srpski</option> </select> </p> <ul> <li><a href="#" id="ar">Ar</a>||</li> <li><a href="#" id="zh-TW">Ch</a>||</li> <li><a href="#" id="en">En</a>||</li> <li><a href="#" id="fr">Fr</a>||</li> <li><a href="#" id="he">He</a>||</li> <li><a href="#" id="sr-SR">Sr</a></li> </ul> <input type="text" id="dt"> <script> $(function() { $('#dt').datepicker($.datepicker.regional['fr']); $('ul li a').click(function(){ $('#dt').datepicker('option',$.datepicker.regional[this.id]); return false; }); }); </script> </body> </html> |
116 članova zahvaljuje stanke za poruku: |
|
|