joanpablo / reactive_forms

This is a model-driven approach to handling form inputs and validations, heavily inspired in Angular's Reactive Forms
MIT License
469 stars 86 forks source link

activating a timepicker when a dialog is opened #243

Open mosheliv opened 2 years ago

mosheliv commented 2 years ago

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?

vasilich6107 commented 2 years ago

@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

mosheliv commented 2 years ago

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.....

vasilich6107 commented 2 years ago

@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?

mosheliv commented 2 years ago

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

vasilich6107 commented 2 years ago

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

mosheliv commented 2 years ago

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

vasilich6107 commented 2 years ago

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

ahmedabdelhafez commented 2 years ago

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

mosheliv commented 2 years ago

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: @.***>