@pythonista21

import ui d = ui.DatePicker() d.mode = ui.DATE_PICKER_MODE_DATE l = ui.Button() l.title = '☀️' l.font = ('<System-Bold>',128) l.frame = (0,0,d.width*2/3,d.height) l.background_color = 'white' d.background_color = 'white' d.add_subview(l) ok = ui.ButtonItem() ok.title = 'ok' def ok_action(sender): d.close() ok.action = ok_action d.right_button_items = [ok] d.name = 'Select year' d.present('sheet') d.wait_modal() sel_year = d.date.year print(sel_year)