package ti.modules.titanium.ui.widget.picker;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.DatePicker;

import org.appcelerator.kroll.common.Log;
import org.appcelerator.titanium.proxy.TiViewProxy;
import org.appcelerator.titanium.util.TiUIHelper;

public class CustomDatePicker extends DatePicker
{

	private TiViewProxy proxy = null;

	public void setProxy(TiViewProxy value)
	{
		this.proxy = value;
	}

	public CustomDatePicker(Context context)
	{
		super(context);
	}

	public CustomDatePicker(Context context, AttributeSet attrs)
	{
		super(context, attrs);
	}

	public CustomDatePicker(Context context, AttributeSet attrs, int defStyleAttr)
	{
		super(context, attrs, defStyleAttr);
	}

	@Override
	protected void onLayout(boolean changed, int left, int top, int right, int bottom)
	{
		super.onLayout(changed, left, top, right, bottom);
		if (this.proxy != null) {
			if (changed) {
				TiUIHelper.firePostLayoutEvent(this.proxy);
			}
		} else {
			Log.w("Picker", "Proxy not assigned to a native view!");
		}
	}
}

@@ -910,19 +910,12 @@
 null
-) %7B%0A%09%09%09if (
+ && 
 chan
@@ -921,17 +921,16 @@
 nged) %7B%0A
-%09
 %09%09%09TiUIH
@@ -972,13 +972,8 @@
 y);%0A
-%09%09%09%7D%0A
 %09%09%7D 

Improve check.