-
Notifications
You must be signed in to change notification settings - Fork 189
Initiailise date from input #227
Comments
|
Also bootstrap integration doesn't mean you don't have full access to all features, it just adjusts styling according to current bootstrap theme in use. |
I want it to initialise with the date contained in the input element. not to initialise the picker with a date by reading it from the input element and setting it using the date option in javascript. This is because I expect the date to be automatically initialised from the input field the picker is attached to (as this would be expected functionality). If I use the picker to select a date, and then re-open it, I would expect the date previously chosen to be in the picker, not the original. The bootstrap integration is initialised by attaching the picker to a selector, so there is no easy way to initialise it with options based on the elements it gets attached to - eg if you call $('.pickerclass').pickmeup_twitter_bootstrap(), there's no way to say to it "this is the date that each element contains at startup". |
Yeah, I agree it should have been initialized from the field it is attached to. Currently you can also use |
I tried to update the js to handle it, but I couldn't quite figure out where it shoudl be put, and what the interaction between (IIRC) options.current, default_date and date variables were. |
Just iterate over elements on the page and apply it to each element with unique settings or add attribute as I mentioned. |
why add these attributes, why not just read the value instead of duplicating the data? |
That is the way it works in currently release version, it doesn't treat |
I assume I'm missing something really obvious, but when clicking on the input field to pop the datepicker, the picker always sets itself to the current date, and not the date set in the input field. I can;t see any option to change this, it all seems to be centered around manually populating the picker with a new date object.
I use the bootstrap intergration, so there is no javascript to call when the input is clicked on by default, and I really don't want to have to add js event handlers to every element that might be a datepicker.
The text was updated successfully, but these errors were encountered: