Fabián Romo
Fabián Romo

Reputation: 329

Two datepickers open at the same time Is it possible?

I need to enter an initial date and a final date similar to this application in IOs:

Gif video about IOs app

I'm thinking of using a DatePicker to enter the initial date and then another or the same for the final date.

But my boss wants to see both DatePicker at the same time for the start date and end date. Is that possible?

Or there is a way to do something similar to the video gif previously indicated.

Thanks

Upvotes: 0

Views: 34

Answers (1)

oldcode
oldcode

Reputation: 1711

You could you use 2 datepickers like this below,

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
   >

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            >

            <DatePicker
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"                

                ></DatePicker>

            <DatePicker
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">

            </DatePicker>



        </LinearLayout>
    </ScrollView>





</LinearLayout>

Upvotes: 1

Related Questions