Forum Archive

Calendar

brumm

I like to share my calendarapp. The layout is developed for my phone, but the important views are auto-resizing. Many thanks @cvp for the objc part.

cvp

@brumm Nice
If you want to have a date-year picker, try this little (ugly) script
```
import ui

v = ui.View()
v.name = 'Day Time Month Year Picker'
v.frame = (0,0,500,500)
v.background_color = 'white'

d = ui.DatePicker()
d.frame = (50,50,200,200)
d.mode = ui.DATE_PICKER_MODE_DATE_AND_TIME
d.background_color = (200,200,200,1)
v.add_subview(d)

y = ui.DatePicker()

y.background_color = 'lightgray'

y.mode = ui.DATE_PICKER_MODE_DATE
y.background_color = d.background_color
y.frame = (50,50,300,200)
v.add_subview(y)

d.bring_to_front()

v.present('sheet')```

brumm

Looks much better now, not ugly :)

cvp

@brumm I just wanted to say that my quick code was ugly (I hope @ccc didn't see it 😢), not the visual aspect.

cvp

@brumm If you allow to specify the start/end date of the event, perhaps could you also allow to set the year (if you have enough room on the screen)

cvp

@brumm You could perhaps be interested by this (not so easy) modification to check the location while typed, without going to a map app...

brumm

@cvp: Sounds good, but at the moment I'm thinking about writing an ObjC tutorial. I need a basic knowledge to write ObjC code, because currently I'm just trying until it works...

cvp

@brumm ok, no problem (I do the same a lot of unsuccessful tries and then, miracle, it works 😥)