Reset JFXDatePicker JavaFX

0

Good day everyone! I think I'm really enjoying this website that has helped me! THANKS TO ALL!

Well here I go Today I realize that in the small application that I am developing I have a problem with the famous DatePickers. The question is the following one I have an interface where I add two (2) JFXDatePickers from the SceneBuilder (Scene Builder) and switch them to Clock mode and they know something similar to those of android the question is that when I finish saving data I to all textfields and JFXDatePickers I set them "Empty" example: midatepicker.setTime (null); but this does not mark error and it does not work either I've already tried with setText (""); and neither

Agradesco a solution Greetings Roderick

    
asked by Riddick 19.10.2017 в 20:49
source

1 answer

0

I have never used the JFXDatePicker but looking at the documentation:

public class JFXDatePicker extends DatePicker

And to leave a DatePicker empty you have to invoke the setValue method:

txt_HoraIni.setValue(null);

I hope it works for you, I always use it in my applications and it always works.

    
answered by 21.10.2017 в 17:39