Hi,
This date picker is not working on the node edit page. It's showing current date in edit page also.

Comments

prashant.c’s picture

Status: Active » Needs review
StatusFileSize
new103.17 KB

@saranya purushothaman

Thanks for raising this issue but there could be some other issue with you installation as i tested on node edit page and its working fine (PFA).

Can you please attach screenshot of your field widget settings and node edit page ?

saranya ashokkumar’s picture

StatusFileSize
new6.62 KB
new7.15 KB

Thanks Prashant.c.

I have attached my widget screenshot before and after bootstrap date time picker. PFA.

In bootstrap-datetimepicker.js file, I mae some change then it is working. But Its is not correct way to do.

        // Set defaults for date here now instead of in var declaration
        date = getMoment(input.val()); // here passing input value before changes it is like date = getMoment();
       

I don't know what I have done wrongly.

prashant.c’s picture

I could not get your point.
In your screenshots there is only date format change.
And can you please let me know why are you making changes in the bootstrap file itself, what are your requirements ?

saranya ashokkumar’s picture

Prashant.c,

In my screenshot. Date also getting change. Always showing today's date in node edit page not saved date.

In normal Drupal Date, it's showing correct date. In bootstrap datetimepicker, showing current date.

I don't know what I have done wrongly. As per in readme.txt I have installed this module. Please let me know If you need more details.

Thanks,
Saranya.

prashant.c’s picture

Can you please share the screenshots of the Field Widget settings Form for the content type ?

saranya ashokkumar’s picture

StatusFileSize
new61.88 KB

Prashant.c,

Please find the attachment for content type widget settings form.

prashant.c’s picture

Status: Needs review » Closed (cannot reproduce)

@saranya purushothaman

Thanks for your efforts.

Sorry but i tested with couple of different versions of Drupal 8 and in all of them date picker worked fine on node edit pages without any issues.

I am not sure why you are facing this issue.

Without replicating it we won't be able to fix.

As of now closing it.

Please try to replicate on some other Drupal installation and then feel free to re-open it.

Thanks.

saranya ashokkumar’s picture

Status: Closed (cannot reproduce) » Active

Hi Prashant.c,

I have installed this module in plain Drupal instance. I still facing the same problem. Date picker is working, there is no problem in that. But for node on edit page, it is not showing the date field value in database. It showing always current date. That is the problem.

Please check in the above case.

Thanks,

prashant.c’s picture

@saranya purushothaman

It is saving the values in the database correctly but somehow changing the value in the UI from some javascript (it seems like).

I am not getting time to work in this, If you can work on the same that would be highly appreciated.

vakulrai’s picture

Status: Active » Needs review
StatusFileSize
new1.59 KB

@ saranya purushothaman, adding a patch which will fix the bug. Need to add a property to Bootstrap.

  • Prashant.c committed 77e5d51 on 8.x-1.x authored by vakulrai
    Issue #2989684 by vakulrai, saranya purushothaman, Prashant.c: Not...
prashant.c’s picture

Status: Needs review » Fixed
StatusFileSize
new1.44 KB
new1.34 KB

Thanks @vakulrai for the patch and @saranya for raising this critical issue.

I have refactored the patch and commit to new tag and dev branch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.