4

I've been struggling with the docs of strapi for this.

There's a collection of articles. When creating an article, there are 2 fields i.e Start Date and End Date. Now when a value of Start Date changes and user is done selecting an event, I want to update the value of End Date 6 months from that.

Ofcourse the calculations of value are not a problem but I'm unable to find anything to update the value on blur event.

Right now, I'm using beforeCreate and beforeUpdate lifecycle hooks but all these hooks mentioned in strapi doc run when a user clicks Save button.

This might solve the case but this is not an idea scenario for a user coming from Wordpress or any other custom CMS where this is easily doable

1 Answer 1

2

Strapi is not providing any blur events for now . We have Posted Comments on the strapi forum untill then only way to fix this is by using life cycle events provided by strapi. Refer this link https://docs.strapi.io/developer-docs/latest/development/backend-customization/models.html#lifecycle-hooks

  1. Get Date and Time in Separate Fields .
  2. Merge those values when clicking on save button .

https://forum.strapi.io/t/change-value-of-input-field-on-another-fields-blur-event-in-strapi/19829

Sign up to request clarification or add additional context in comments.

1 Comment

Well, that sucks. Such basic functionality should be available.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.