Nerian / bootstrap-datepicker-rails

A Datepicker for Twitter Bootstrap, integrated with Rails assets pipeline
MIT License
649 stars 182 forks source link

Format must be set to yyyy-mm-dd by default #112

Closed AlexVPopov closed 8 years ago

AlexVPopov commented 9 years ago

Hello,

I was encountering a similar issue to #2. In my case the date was 2015-10-10 and the datepicker was starting at 1 November 1901. Only after I changed the format to yyyy-mm-dd did it start to work properly. I think this must be documented, as the aforementioned format is the default one for Rails. I am willing to make a PR to the README. Will you accept such a PR?

Alternatively, this option could be set in the source code, since (as already mentioned) this is the default Rails format.

PirunSeng commented 8 years ago

Hi,

I would say the format must be set to any format in order make the date picker works properly. If the format is not set, then you might come up with the date record is not saved sometimes. We can specify format in the config or directly in the calling script.

Regards,

Nerian commented 8 years ago

Hi,

The default settings are not set in this codebase. You may want voice your concerns in: https://github.com/eternicode/bootstrap-datepicker

PirunSeng commented 8 years ago

@Nerian ! I'm afraid I don't understand your statement: 'You may want voice your concerns'. I wonder if you could simply your meaning.

Nerian commented 8 years ago

Sure. This repository simply packages the datepicker into a gem. The actual project home is https://github.com/eternicode/bootstrap-datepicker. It's there where code changes happen, and so it's there where you should suggest the change.

PirunSeng commented 8 years ago

@Nerian ! Oh, I see. Sorry for my misunderstanding of reporting in wrong place.

salmannausher commented 6 years ago

Hello Every one I am facing an issue if any one could help when i use date format yyyy-mm-dd it works and saves in data base perfectly but when i use other formats like mm-dd-yyyy then it save nil ?