I have a content type (Basic page) and created two fields Start date and Optional Start date using Smart date range field type. I also created a field fieldset group and place both of the smart date range fields on the group. When creating a new content and I changed the Start date time it calculates the end time which is correct however it also affects the other field's end time. I figured that this is happening because I have two fieldset parents. The code we have in smart_date.js "setEndDate()" looks for the parents('fieldset'). I think we can fix this by using closest() or parents('fieldset').first()?
var wrapper = $(element).parents('fieldset')
Comment | File | Size | Author |
---|---|---|---|
#2 | 3128818-2.patch | 500 bytes | rjbautista |
Comments
Comment #2
rjbautista CreditAttribution: rjbautista at Promet Source commentedAttaching here the patch that I did.
Thank you!
Comment #3
rjbautista CreditAttribution: rjbautista at Promet Source commentedComment #4
rjbautista CreditAttribution: rjbautista at Promet Source commentedComment #6
mandclu CreditAttribution: mandclu at Northern Commerce commentedHaving two Smart Date fields grouped in a fieldset seems like an edge case, as I don't understand why you couldn't allow two values in a single field. That said, it looks like an easy fix and doesn't appear to cause any other issues, so merging this in.