This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Ban Nguyen
Posted Jan 28 - Read on Facebook

hi everyone,

I am creating a date dropdown. It kinda works but I am struggling how to line up month, day and year horizontally when selected. I have tried .scrollToPoint but it doesn't work. Could you help? Thank you! http://share.framerjs.com/3wjx4dz3ilbf/ Sorry my code is not clean! If you have a better way, please help

14 Comments

Ban Nguyen

I want it to look like this

Arron J Hunt

Instead of a ScrollComponent for each picker, you'll want to use a PageComponent

Andrew Nalband

Ban Nguyen how would it work if you selected the first and/or last element? i.e. December 1? There are not items before or after those.

Ban Nguyen

Andrew Nalband, Jordan Robert Dobson, so I kinda have a solution for the calendar : http://share.framerjs.com/7u0uljqe0e9a/ again my code is not that pretty, sorry! Anyway, it works but one thing i'd like improve it when users scroll months horizontally. I want the months lineup nicely (DONT'T want it to look like the attachment)

Andrew Nalband

Ban Nguyen try using a page component instead of a scroll component

Ban Nguyen

yay it works http://share.framerjs.com/2kt1v7ek7n20/. What do you think?

Ban Nguyen

Andrew Nalband but i cannt use this : unless yearScroll.isMoving

Andrew Nalband

Ban Nguyen great improvement! You may want to keep the positioning of the name of the month consistent on each page

Andrew Nalband

I'm not exactly sure what you're doing with that line. Does unless yearScroll.isAnimating work?

Ban Nguyen

I will try

Ban Nguyen

When page isMoving then users can't click on the day

Ban Nguyen

i use yearScroll.on Events.ScrollEnd, -> and it works. What is the difference with yearScroll.on Events.ScrollAnimationDidEnd, ->???

Ban Nguyen

if i use yearScroll.on Events.ScrollEnd, -> I have to two times

Read the entire post on Facebook