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 |
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 |
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> |
Vreme je GMT +2. Trenutno vreme je 01:46. |
Powered by vBulletin® Verzija 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © DevProTalk. All Rights Reserved.