reactive_forms icon indicating copy to clipboard operation
reactive_forms copied to clipboard

activating a timepicker when a dialog is opened

Open mosheliv opened this issue 4 years ago • 9 comments

I have a reactive_form dialog with a start_time and end_time timepicker. I want the start_time to be opened as soon as the dialog is opened, without the user having to tap the icon. Is that possible?

mosheliv avatar Nov 30 '21 23:11 mosheliv

@mosheliv it does not seem to be related to the form functionality. Look at your DateTime picker control if it supports programmatically opening the picker and open it after first frame with registerPostframeCallback

vasilich6107 avatar Dec 01 '21 05:12 vasilich6107

You are right if the form does not supports it as a functionality, which I guess it does not. Thank you for helping even though it's unrelated, much appreciated. Some things are just difficult in flutter.....

mosheliv avatar Dec 01 '21 05:12 mosheliv

@mosheliv one more time - your case does not seem to be the field of form responsibility This seems like responsibility of the particular control which you are using. What type of DateTime picker are you using?

vasilich6107 avatar Dec 01 '21 05:12 vasilich6107

I understand, i was just thanking you for mentioning the postframecallback which i wasn't aware of. Not sure it will help. I am using the one used in the example reactivetimepicker

mosheliv avatar Dec 01 '21 05:12 mosheliv

@mosheliv could you attach a link to exact line of the example file?

vasilich6107 avatar Dec 01 '21 05:12 vasilich6107

https://github.com/joanpablo/reactive_forms/blob/47ba5c3d59f625bba191efdb9f0de7f552d8dec7/example/lib/samples/complex_sample.dart#L170

mosheliv avatar Dec 01 '21 06:12 mosheliv

@mosheliv it seems that this control does not support programatical opening( It is the point of improvements

vasilich6107 avatar Dec 01 '21 09:12 vasilich6107

can you post your code how to create date picker or time picker

ahmedabdelhafez avatar Mar 28 '22 07:03 ahmedabdelhafez

You can look at the demo, it has one

On Mon, Mar 28, 2022, 20:41 ahmedabdelhafez @.***> wrote:

can you post your code how to create date picker or time picker

— Reply to this email directly, view it on GitHub https://github.com/joanpablo/reactive_forms/issues/243#issuecomment-1080305810, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7IWC74NY7M3TV4CR6L5JLVCFPDRANCNFSM5JDA2DFQ . You are receiving this because you were mentioned.Message ID: @.***>

mosheliv avatar Mar 28 '22 08:03 mosheliv