Conversation
|
I think that your solution is not correct. Personally, I think that if the widget doesn't cause any issues there's no need to change that line. |
|
indrimuska, if you getting doubt about my guess, than i prove you that i'm right can you explain this behavior for me? what i'm doing wrong? |
|
If you just want to change the date format you have simply to add |
|
what if i want to set maximum and minimum values or exclude some dates? |
|
You can choose a min and max date, but I don't know any solutions that lets the UI datepicker to exclude some specific days. |
|
@indrimuska is right this solution is not correct this.options is options for the particular instance you want to modify these with the values from defaults, the defaults are then over written by data attributes, which are overwritten by options passed via the options hash in js. this is the correct order of precedence for the options. @indrimuska is also write about the issue with your code being duplicate id's see the issue he linked to. Im going to close this as not a bug. |
|
@litvinenkow also for excluding certain days you want http://api.jqueryui.com/datepicker/#option-beforeShowDay |
|
@arschmitz, thank you for your widget and answer, could you please write some readme's? |
|
I'm a bit confused. I've been trying to get this datepicker working, but I'm having trouble adjusting the default date format. I've tried the fix data-date-format="dd-mm-yyyy" (after finding it in a closed comment) and that has worked. But this would mean adjust that on every input and I really want to change the default settings. So how can I adjust the default date format without using "$.extend( $.datepicker._defaults, this.options );" ? |
|
Look at #29 first. |
|
Hi, |
|
There have been working examples of options shown and they have been tested and option setting works fine for both data format and others if you believe there is a bug we need to see a test page demonstrating your issue using the latest code from master. with out this i'm not sure how we can help you. |
|
@devsie if you use an external widget in you code, you have to treat it as a "library". In this way, you don't have to change the sources, you can just use all the methods the library provides to you. As I linked you, in #29 (comment) there are two solution to change options for all your inputs:
Good luck. |
|
@indrimuska Thank you. I had downloaded the code - jquery.mobile.datepicker.js to host it locally. (I understood that'd be faster). I have followed your solution and used: However, may I ask, if it's not there to change the default settings, what is the purpose of 'dateFormat: "dd-mm-yyyy" ' on line 47 of jquery.mobile.datepicker.js? |
|
In the previous version of the wrapper, all default settings were in the widget options. In one of the last commit, arschmitz added the method |
|
I fear it'll be a while before I fully comprehend. But thank you @indrimuska and @arschmitz for solving my issue and thank you for the wrapper/widget in general. |
No description provided.