Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Make timezone return all jQuery data instead of just select values #1468

Conversation

cmcculloh-kr
Copy link

fixes #1466

name: timeZone.name,
offset: timeZone.offset
},
timeZone: timezone,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking through this file I don't see where timezone (all lower case is being set). Please confirm.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's it. Just a typo, should be timeZone.

@interactivellama
Copy link
Contributor

var timeZone = this.$timeZone.selectlist('selectedItem'); should return all the data via the selectlist API as you say.

Don't forget about setValue.

@cmcculloh-kr
Copy link
Author

This should not affect setValue. We aren't actually changing the API, all we are doing is allowing the dev access to data items they set on the value the user selected. This lets them do something like (contrived example) data-color on each item to assign colors to timezones and then get the color associated with the timezone the user selected.

@interactivellama
Copy link
Contributor

If I want to set the timezone programatically, wouldn't we want to allow the app to set the id, too?

I think the app ignores the actual selectlist options and just selects whatever you feed it via setValue()

@cmcculloh-kr
Copy link
Author

Our official example doesn't list or support timeZoneIds. The setValue code is:

image

Trying to add timeZoneIds to the API is well beyond the scope of the change I'm requesting. Even allowing timezone selection by any other data attribute on that field is beyond the scope of my request, although I wouldn't necessarily argue against it. It's just out of scope for what I need right now.

@swilliamset
Copy link
Contributor

We should refactor to make the setValue more flexible
https://github.com/ExactTarget/fuelux/blob/master/js/scheduler.js#L466-L470
3578-all-the-things1

swilliamset added a commit that referenced this pull request Aug 18, 2015
…t-value-return-id

makes timezone return all $.data() instead of just select values
@swilliamset swilliamset merged commit 4d2c2a9 into ExactTarget:master Aug 18, 2015
@interactivellama interactivellama changed the title makes timezone return all $.data() instead of just select values Makes timezone return all $.data() instead of just select values Aug 19, 2015
@interactivellama interactivellama changed the title Makes timezone return all $.data() instead of just select values Make timezone return all jQuery data instead of just select values Aug 19, 2015
@cmcculloh-kr cmcculloh-kr deleted the 1466---make-scheduler-get-value-return-id branch September 15, 2015 16:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return time zone ID with name and offset
3 participants