rnkit/rnkit-actionsheet-picker

I need to hide the 'second' part in android just like your Example gif is

Closed this issue · 1 comments

Description

sample init a react native project,install and link this package,the datepicker show [year, month,date,hour,min,sec], but your Example gif is [year, month,date,hour,min] in android,there is no 'second' part at all!
I need this result like your Example gif.

btw, I wonder why the ios is [year, month,date,hour,min,sec] ,but your document show the 'secondsText' is support for android, do you want to make them different on purpose?

btw, I'm chinese, I will be so pleasue if you reply to me in chinese !

Additional Information

  • React Native version: [0.48.2]
  • Platform: [Android s7 simulator or nexus 4 simulator]
  • Operating System: [mac 10.12.6 ]
  • Package Version: ["rnkit-actionsheet-picker": "^1.1.0"]

@simman ,I found the answer by myself

// ASDatePickerViewModule.java
private boolean[] getDatePickerType(String type) {
        if (type == null)
            return new boolean[]{true,true,true,true,true,true};
        else if (type.equals("time")) {
            return new boolean[]{false,false,false,true,true,true};
        }else if (type.equals("date")) {
            return new boolean[]{true,true,true,false,false,false};
        }else if (type.equals("datetime")) {
            // return new boolean[]{true,true,true,true,true,true};
            return new boolean[]{true,true,true,true,true,false};// modify here
        }
        return new boolean[]{true,true,true,true,true,true};
    }

so it is a bug.